[MarkLogic Dev General] Complex type instead of escaped html in simple type

Henrik Thiil Nielsen henrikthiil at post1.dansknet.dk
Sun Aug 26 14:53:48 PDT 2012


Dear MarkLogicians,

Unfortunately I have to have HTML mark-up in some nodes in my XML documents.

Currently those nodes are string simpletypes with  embedded escaped HTML
tags. 
I would prefer to turn them into complextypes and replace the escaped HTML 
tags with proper XML subnodes, but I only know how to retrieve the contents 
as text without the sub-node tags (but with the text inside the latter)  or
with
 the sub-node tags included as text. How can I retrieve the contents of the
node 
as text and have the sub-node interpreted as (X)HTML?

Given:-

<outernode>This is a <span class="heavy ">very</span> rainy night in
Copenhagen</outernode>

I know how to get:-

This is a <span class="heavy ">very</span> rainy night in Copenhagen	(as
text)

And also:-

This is a very rainy night in Copenhagen	(as text and with no
special formatting of "very")

But I want to get:-

This is a very rainy night in Copenhagen	(as text with "very" in bold
type assuming I have the proper CSS)



Thanking you in advance,

Henrik Thiil Nielsen



More information about the General mailing list