[MarkLogic Dev General] embedded html

Paul M pjmaip at yahoo.com
Thu Oct 30 07:35:57 PST 2008


I have the following html:
this is my <sub>html</sub> snippet

I want to add it to my tag:
<mytag xmlns="mine">
this is my <sub>123</sub> snippet

And then add it to my doc using node-insert
However,  sub html element is now in the wrong namespace. So when I perform the following:

<sub xmlns="mine"> is in the wrong namespace

My best solution is creating an additional tag (note ->block<- level tag)
<mytag xmlns="mine">
<div xmlns="htmlns">
this is my <sub>123</sub> snippet

and when I want the html, I simply use

I could also perform a search and replace on every html element before adding the snippet (In perl most likely, so regexp)?
this is my <sub xmlns="htmlns">123</sub> snippet

The only other solution I can see is storing the html not as node by as data (embedded).  This seems somewhat prone to problems though.

How should this be handled. Best practices?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://xqzone.marklogic.com/pipermail/general/attachments/20081030/e08f2736/attachment.html

More information about the General mailing list