On 27 Aug 2008, at 22:53, Eric Palmitesta wrote:
One such quirk: Childless elements with no internal nodes and an explicit closing tag are automatically folded into elements with no closing tag. <div></div>, which is valid xhtml, will become <div /> after being processed by MarkLogic (breaks visual representation). Some better examples are <script ...></script> and <textarea></ textarea>, which are expected to contain no internal nodes in xhtml.

I've taken to writing things like

<script ... >{" "}</script>

or

<textarea>&nbsp;</textarea>

which successfully preserves the explicit closing tag, keeping xhtml happy. Is there a more elegant way to do this?

Are there other banana-peels I should watch out for when generating xhtml with xquery? Is creating an entire website by generating xhtml with xquery generally frowned upon, or accepted? Admittedly, it seems less flexible than a <web language>-based site, however the xdmp namespace seems to provide sufficient functionality, and transforming xml data into xhtml is incredibly easy with xquery.

Though it's not relevant to your particular problem, this is the reason that we've stopped generating XHTML and gone back to outputting HTML4. Trying to do XHTML in a text/html environment is fraught with troubles like these.

Some more details:

  http://hixie.ch/advocacy/xhtml

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

Reply via email to