• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Standalone parameter

 
Vasudha Deepak
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a doubt regarding the standalone parameter,specfied in the XML declaration.
Is it essential that when standalone="no" is given in the XML declaration,that it should have a DTD/Schema associated with it?
PXML2 says that when standalone="no",an external DTD is required,but again IE6 does'nt report any error, and when I tried with XML Spy,it just said once that no DTD/Schema was found with this XML
file.
Does it mean that the "standalone" parameter is just an indicator and does not enforce any rules?
Thanks,
Vasudha
 
Jayadev Pulaparty
Ranch Hand
Posts: 662
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have xml schema validator downloaded from microsoft's website and it doesn't seem to care with the standalone being "yes" even though i refer to an external DTD. Things get validated properly and the attribute value seems to be completely ignored;
 
Dan Drillich
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XML in a nutshell says -
Documents that do have DTDs can also use the value yes for the standalone attribute if the DTD doesn't change the content of the document or if the DTD is purely internal.

So, maybe this attribute is not really meaningless
Let me check it out.
Cheers,
Dan
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The XML Spec says (page 15) 'The value "no" indicates that there are or maybe such such external markup declarations'.
Also 'If there are no external markup declarations, the standalone document declaration has no meaning. If there
are external markup declarations but there is no standalone document declaration, the value "no" is
assumed.'
Therefore the answer to your question "Is it essential that when standalone="no" is given in the XML declaration,that it should have a DTD/Schema associated with it?" is no, it need not have an DTD/Schema associated with it.
Hope that helps.
cheers,
Vinayak
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic