|
From: | Per Bothner |
Subject: | Re: XML strictness |
Date: | Mon, 30 May 2005 20:58:56 -0700 |
User-agent: | Mozilla Thunderbird 1.0.2-1.3.2 (X11/20050324) |
Robert Schuster wrote:
You get the same message with all proprietary JDKs prior to 1.5 . The latest incarnation however accepts creating the <new> node and generates the following XML upon calling 'echo "<a/>" | /opt/sun-jdk-1.5.0/bin/java xmlfilter.XMLFilter': <?xml version="1.0" encoding="iso-8859-1"?> <a/> <new/> AFAIK there should/must be only one top-level node which is named <xml>. I am confused ... Is Sun breaking the rules here?
Depends on which set of rules. The "XQuery 1.0 and XPath 2.0 Data Model" is a bit more general: See http://www.w3.org/TR/xpath-datamodel/#DocumentNode Of course an *XML document* is somewhat more restricted, but if you want to use DOM to support XQuery/XPath/XSLT objects it makes sense to allow more generality. -- --Per Bothner address@hidden http://per.bothner.com/
[Prev in Thread] | Current Thread | [Next in Thread] |