Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Possible to declare CDATA entities? 1

Status
Not open for further replies.

air0day

Programmer
Jun 7, 2007
1
US
Hello,

I'm totally out of ideas for how to solve this problem. I hope someone here can help me.

Basically I've got a bunch of XML documents. These contain entity references like &product-name; and &company-name;.

The entities are defined in an .ent file like so

<!ENTITY company-name "Company X">

Then there's this xquery script that outputs html files based on these xml files.

My question is, is there a way to declare an entity that resolves to it's character data only? Meaning:

<!ENTITY trademark "&trade;">

So that if someone used &trademark;, it would simply resolve that to "&trade;" without trying to additionally resolve &trade;? I want the html file to contain the string "&trade;"

Any help would be greatly appreciated. Thank you.
 
Not clear in what way xquery's intervention matters, the trademark this way will stop further resolution.
[tt] <!ENTITY trademark "&[red]amp;[/red]trade;">[/tt]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top