|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: xml 2.0 - so it's on the way after all?
Norman Walsh wrote: > / Bob Foster <bob@o...> was heard to say: > | One radical idea would be to define > | parseable entities in XML, in a > | separate entity namespace, using a > | simple first-definition-wins rule and > | XInclude for the external ones. I > | wonder why nobody's proposed that? Oh, > | wait, a number of people have proposed > | that. They just get slapped around > | here until they go away. ;-} > > That may be the right answer, if we have to go that far, but it's not > without complications that would need to be addressed. For one thing, > how would these extra elements interact with validity assessment? For > another, would you allow the declarations to be scoped? If yes, then > that must be first declaration in scope. If not, how do you deal with > transclusion? Are the entity references manifest in the parsed document? > Do they survive parsing and re-seralization? Etc. All good questions. Especially the etc. ;-} First of all, this could be implemented today with no change to XML by a preprocessor that simply removed all elements from the "entity namespace" and expanded all references. It would be necessary that references _not_ use the & character or any other that might interfere with normal parsing. It is not necessary to allow definitions within expansion text. If the preprocessor went to text which was then reparsed, no issues except performance. This also deals with the validation question. And would collect valuable experience. If it were, e.g., the head of a SAX stream, it would need to recursively parse the result of expansion. I believe the technical term for things like scoping and transclusion is "piling on". There is a penalty for that. ;-} Today's entities don't support either. Round-tripping is, as today, bothersome. XML doesn't require that validating parsers report entity references, in fact it appears to require they don't. Some do anyway. But expanded internal GE references in attribute values are not reported by DOM or SAX. Etc. Could one write parser implementations that preserved references as well as they are preserved today for entities? Sure, but they would also need to preserve definitions, which to validate would mean that schemas would need to explicitly allow the definitions or be applied through, e.g., NVDL. Bob
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








