View Full Version : XML standalone? When and why?
Tails
06-06-2004, 12:22 AM
Upon looking for officlal W3C "Valid XML!" icons (theyn're not in the icon section of the W3 site for some reason but I remember seeing one once), I came across http://www.online-learning.com/demos/xml/valid_decl.html. In their XML declaration page, they talk about the standalone attribute. I don't understand their definition of it. My guess would be that stand-alone means that it has it's own internal DTD and no need for any external namespace URIs (friendly for those with no internet connection). But in their DTD example, they showed an internal DTD with standalone="no". What is the intended purpose and rendering for this?
liorean
06-06-2004, 01:33 AM
The standalone declaration (http://www.w3.org/TR/REC-xml/#NT-SDDecl) means that the document is self-contained. That in turn means one of three things:
- There is no DOCTYPE declaration in it.
- The DOCTYPE declaration is inline only.
- The DOCTYPE declaration is external or combined, but the external part contains no data that changes the infoset representation of the document. The criteria for fulfilling this can be found at <http://www.w3.org/TR/REC-xml/#vc-check-rmd>
It does not have any connection with namespaces, as they are just identifiers. It only describes the parse-time situation, which means that post-parsing referential technologies (i.e. that operate on the infoset level) such as xml-stylesheet PI, XLink or XInclude go unaffected.
What is it good for? Well, it tells a validating parser whether it's safe to build the infoset before or even without reading the external declarations.
gsnedders
06-06-2004, 02:27 AM
http://www.w3.org/Icons/valid-xml10.gif
If you still need it, there it is ;)
Tails
06-06-2004, 02:36 AM
The standalone declaration (http://www.w3.org/TR/REC-xml/#NT-SDDecl) means that the document is self-contained. That in turn means one of three things:
- There is no DOCTYPE declaration in it.
- The DOCTYPE declaration is inline only.
- The DOCTYPE declaration is external or combined, but the external part contains no data that changes the infoset representation of the document. The criteria for fulfilling this can be found at <http://www.w3.org/TR/REC-xml/#vc-check-rmd>
It does not have any connection with namespaces, as they are just identifiers. It only describes the parse-time situation, which means that post-parsing referential technologies (i.e. that operate on the infoset level) such as xml-stylesheet PI, XLink or XInclude go unaffected.
What is it good for? Well, it tells a validating parser whether it's safe to build the infoset before or even without reading the external declarations.
Prior to knowing of this attribute, my XML files have validated properly with an external system DTD. I'm not sure what infoset is, but I know that any name space dependant page can't be standalone.
http://www.w3.org/Icons/valid-xml10.gif
If you still need it, there it is ;)
Thanks, I was looking on http://www.w3.org/Consortium/Legal/logo-usage-20000308.html. They should add it there as well as to a successful XML validation.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.