[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Compound Documents - necessary for success?
At 12:33 PM 2/1/99 +0100, Ron Bourret wrote: >I think that many of us have a notion of a "compound document" and "reusing >schemas" but that, for most of us, these notions don't go much beyond the >actual words and a hazy, utopic, AI-intensive dream that XML documents will >somehow magically recombine themselves to solve all of our problems. > <snip Players and Height DTD examples> >What I think a lot of people would like is to automagically combine these >two DTDs so that the following document is valid: > > <?xml version="1.0" ?> > <!-- Note the illegal syntax. There is > currently no legal way to express this. --> > <!DOCTYPE "Player" System="players.dtd" System="height.dtd"> > <Players> > <Player> > <Name>Joe Tall</Name> > <Team>Iowa Talls</Team> > <Height> > <Scalar>3</Scalar> > <Units>meters</Units> > </Height> > </Player> > </Players> > >This does not currently work for two reasons. First, there is no way to >express that a document is valid under two different DTDs. Second, the >above document is clearly not valid under either of the above DTDs. To >create such a document under the current spec, we need to rewrite >players.dtd: > ><!ELEMENT Players (Player*)> ><!ELEMENT Player (Name, Team, Height)> ><!ELEMENT Name (#PCDATA)> ><!ELEMENT Team (#PCDATA)> ><!ENTITY % height SYSTEM "height.dtd"> >%height; > I may be showing my gross ignorance of both XML and namespaces here, but isn't this at least part of the problem that namespaces were meant to address? Granted, as Ron pointed out, a human still has to make the decision as to whether "<Height>" is relevant to "<Players>", but once there is agreement on what "height.dtd" represents authors should be able to re-use that DTD wherever it makes sense. I see the "height.dtd" as being something established by a world standards organization that allows common representation of "vertical height" information across all applications that use such things. With that in mind, it should be straightforward to use it in this context. Chris ------------------------------------ "Beware of all enterprises that require new clothes." -- Thoreau xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i... Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To (un)subscribe, mailto:majordomo@i... the following message; (un)subscribe xml-dev To subscribe to the digests, mailto:majordomo@i... the following message; subscribe xml-dev-digest List coordinator, Henry Rzepa (mailto:rzepa@i...)
|
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
|