Re: [xml] Standalone Declaration



On Mon, Aug 01, 2005 at 07:16:57AM -0000, SATISH  KUMAR wrote:
<?xml version="1.0" standalone="yes"?>
<!DOCTYPE note1 SYSTEM "note1.dtd">
<note1>
      something
</note1>

   If i give above XML Document as an input to the Parser with the correct DTD file, parser is validating 
with respect to note1.dtd even if the Standalone is "Yes" instead of displaying error.

XML 1.0 Specification says that Standalone="yes" indicates that there are no external markup declarations.
Looking forward for the Reply.      

Either you didn't read the spec first hand or you seriously misunderstood it !

  http://www.w3.org/TR/REC-xml/#sec-rmd

  3rd paragraph
  "If there are no external markup declarations, the standalone document
   declaration has no meaning."

That should immediately tell you that you misunderstood it.

The standalone declaration means that if you parse the document witout 
fetching the external subset, then you are not missing any information
about this document content.

Since nobody can usually make sense of it, it is never used and I strongly
suggest you don't rely on it. I can back this up because I somewhat on purpose
dropped one of the standalone checks in libxml2 from 2.5.y to 2.6.x just
waiting if this would ever be noticed, still not so far and this has been
left there for nearly 2 years now...

Daniel

-- 
Daniel Veillard      | Red Hat Desktop team http://redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]