>>>> On Fri, 22 Oct 2010 09:23:33 +0700, Cay Horstmann
<cay.horstmann(a)gmail.com> said:
CH> As I had understood it, the need for XML was motivated by these usecases:
CH> 1) To allow developers to use standard XML processing tools. In
CH> particular, this requires to be truthful about the nature of the
CH> documents (i.e. not claim that something is an XHTML file when it
CH> isn't, but is really an artifact that will eventually be transformed
CH> into XHTML)
...and the most important manifestation of that, in my opinion, is the
requirement to have *all* elements prefixed. For example, a proper JSF
XML Syntax View would look like this.
<?xml version="1.0" encoding="UTF-8"?>
<weNeedSomeRootElement
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:h="http://java.sun.com/jsf/html">
<h:html>
<h:head><h:title>Raw XML View</h:title></h:head>
<h:body>
<html:h2>XML declaration: consumed</html:h2>
<html:h2>Processing instruction: consumed</html:h2>
<?xml-stylesheet href="funky.xsl" type="text/xml"
alternate="yes"?>
<html:h2>CDATA section: consumed</html:h2>
<![CDATA[ <p>This is CDATA</p> ]]>
<html:h2>Comments: consumed</html:h2>
<!-- comments consumed -->
<h:form prependId="false" id="form">
<h:panelGrid id="grid" column="2">
<h:outputText id="text" value="hello" />
<h:commandButton id="button" value="reload"
/>
</h:panelGrid>
<html:p>html template text</html:p>
</h:form>
</h:body>
</h:html>
</weNeedSomeRootElement>
CH> 2) To not surprise developers with nonstandard XML processing (such as
CH> processing comments).
I'm not sure what you mean here. XML processing instructions are
standard in XML.
--
| edward.burns(a)oracle.com | office: +1 407 458 0017
| homepage: |
http://ridingthecrest.com/
| 14 work days until German Oracle User's Group Conference