Hi:

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
</mytag>

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:
*:mytag/node() 

<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
</div>
</mytag>

and when I want the html, I simply use
*:mytag/*:div/node()

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?



      
_______________________________________________
General mailing list
[email protected]
http://xqzone.com/mailman/listinfo/general

Reply via email to