• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis

standalone document declaration  RSS feed

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am not able to understand the following statement from W3C XmL doc.
The standalone document declaration must have the value "no" if
"any external markup declarations contain declaration ofd element types with element content,if white space occurs directly within any instance of those types"
Can anybody please explain?
Thanks,
sandeep
 
Leverager of our synergies
Posts: 10065
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
XML document can have internal (inside itself) and external (in other file) DTD, or it can have both. If standalone attribute is set to �yes�, than the document doesn't need external DTD to be read correctly. Why it can be read incorrectly? If an external DTD provides default values for attributes, than omitted values would be interpreted differently. Or if an external DTD defines entities, than entity references (if there any) would be expanded.
As for white space, as far as I understand, if an element content is declared as text (PCDATA), than all white spaces are preserved. If an element has children, but no text, than all white spaces between child's tags will be considered unsignificant and removed.
An any case, it is better to read external DTDs even if we will not use it for validation, just to process an XML document correctly, so most of the time if we use an external DTD, �standalone� attribute shoud be set to �no�.
Is it better or worse now?
 
Gravity is a harsh mistress. But this tiny ad is pretty easy to deal with:
how do I do my own kindle-like thing - without amazon
https://coderanch.com/t/711421/engineering/kindle-amazon
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!