If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

XML standalone? When and why?

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...alid_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?

The standalone declaration 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.

The standalone declaration 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.