XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Polyglot Markup - serializer questions

Thanks to Twitter ( and @xquery ) I stumbled on this

http://www.w3.org/TR/html-polyglot/

I think the goals are excellent, but I do have some questions for 'the experts'.

1) Why is this useful instead of sticking to xhtml ?  The Abstract says "Polyglot markup that meets these constraints as interpreted as compatible, regardless of whether they are processed as HTML or as XHTML, per the HTML5 specification"
But I dont quite get why this is necessary ?  I'm sure I'm missing the obvious, people dont (usually) write specs just for the fun of it.

2) New XML serializer implementations ?
The doc discusses the difference between empty tags which are EMPTY vs not.  E.g. says to use <br/>  but not <p/> (instead use <p></p>)
This would imply (?) that an XML serializer would need to know when its OK and not to compress empty tags.
Serializers such as Saxon with html encoding do this but they do it differently ... e.g a <br/> in XML becomes <br>  in html mode.
Does following this standard imply that we need new output methods for serializers? Or do we have to force serializers to not do any empty element optimization and leave it up to the input code generation/source ?
I think this might be difficult in something like xquery or xslt using dynamic element construction where its not explicit which empty element form is used.
e.g in xquery ... how does the serializer know to expand <p></p> but not <br/>  ?

   element { "p" } {}
   element { "br" }  {}


-David



-- 
-------------------------
David A. Lee
dlee@calldei.com
http://www.calldei.com
http://www.xmlsh.org


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS