Steve, The short answer is: Make sure you're using correctly namespaced XHTML. For example, take a look at the following as evaluated by MarkLogic Server 4.1-1:
xquery version "1.0-ml"; <div></div>, <script></script>, <textarea></textarea>, <div xmlns="http://www.w3.org/1999/xhtml"></div>, <script xmlns="http://www.w3.org/1999/xhtml"></script>, <textarea xmlns="http://www.w3.org/1999/xhtml"></textarea> => <div/> <script/> <textarea/> <div xmlns="http://www.w3.org/1999/xhtml"></div> <script xmlns="http://www.w3.org/1999/xhtml"></script> <textarea xmlns="http://www.w3.org/1999/xhtml"></textarea> The serializer won't collapse empty div, script, and textarea elements if they're in the XHTML namespace. Hopefully this helps. Please let me know if you have further questions or concerns. Justin Justin Makeig Product Manager Mark Logic Corporation 999 Skyway Road Suite 200 San Carlos, CA 94070 +1 650 655 2387 Phone [email protected]<mailto:[email protected]> www.marklogic.com<http://www.marklogic.com> <http://www.marklogic.com/><http://www.marklogic.com/> This e-mail and any accompanying attachments are confidential. The information is intended solely for the use of the individual to whom it is addressed. Any review, disclosure, copying, distribution, or use of this e-mail communication by others is strictly prohibited. If you are not the intended recipient, please notify us immediately by returning this message to the sender and delete all copies. Thank you for your cooperation. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of spig Sent: Thursday, September 03, 2009 10:39 AM To: [email protected] Subject: [MarkLogic Dev General] Marklogic formatting of empty XHTML elements Hi All, I find that some of the XHTML that is generated by MarkLogic creates invalid XHTML that browsers can't render properly. As far as I know, <div></div> are different and rendered differently from <div />. What appears to happen in my browsers is that the code is rendered incorrectly and the self-closed div appears to act only as an open div tag in the browser. So, what I want is to have clean XHTML that looks like this <div></div> and that doesn't get replaced with <div /> by MarkLogic. Is there a way to turn that feature off in MarkLogic? A work-around is to put a into the middle of the div, but I find that hackish and not clean nor is it in the spec to replace tags in this manner. It's also not something that one does naturally in creating XHTML. Designers also aren't aware of this problem so it just creates more work. Is there a way to turn this auto-thinking mode off and let me be the master of my destiny? Thanks, Steve _______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
_______________________________________________ General mailing list [email protected] http://xqzone.com/mailman/listinfo/general
