[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: various issues
Peter@u... (Peter Murray-Rust) wrote: > For discussion assume that the declarations belong to MYDTD > David Megginson writes: > > > > <?ArcBase html?> <?ArcBase math?> > > So in C++ terms MYDTD has two base classes, HTML and MATH. It may be easier to understand architectural forms if you _don't_ think of it in C++ terms... The mechanism is more like, in Java, declaring that a class (DTD) implements an interface (architecture) than inheriting an implementation from a base class. Even this is not really accurate, since in SGML elements don't _do_ anything, they just _are_; it's up to the application to interpret them. The architectural mapping simply tells applications that know how to process the architectural forms ("meta"-DTD) how to interpret instances conforming to a document type ("real" DTD) based on that architecture. > > <!ELEMENT para ...> > > <!ATTLIST para > > html NAME #FIXED "p"> > > This means that PARA (in MYDTD) inherits properties from P (in HTML). Does > that mean it automatically inherits the content model and the attributes? I'm not sure I understand the question. If you're asking if it's now possible to write: <PARA ALIGN=CENTER> ... </PARA> (where the ALIGN attribute is defined in the HTML meta-DTD but not in MYDTD), the answer is no. However, when it's interpreted by an HTML-architecture-aware processor, any "P" attributes with a default or #FIXED value in the meta-DTD will be (considered to be) present. > For example, the content model of P is > (%text)* > which expands to > (#PCDATA | IMG | BR | EM)* <!-- several missed out --> > Can PARA assume these or does it have to map each of these (e.g. IMG) onto > html: > <!ELEMENT image ...> > <!ATTLIST image > html NAME #FIXED "img> A "PARA" element can contain whatever is allowed by its content model in MYDTD. The only restriction is that when the children of a PARA element are mapped to HTML, the result must conform to "P"s content model in the meta-DTD. > similarly does PARA have to explicity declare the same attributes as P in HTM > L? Only if it wants to use those attributes in the source document. > > <!ELEMENT sym ...> > > <!ATTLIST symbol > > html NAME #FIXED "sym" > > math NAME #FIXED "symbol"> > > > This is - presumably - multiple inheritance in that SYMBOL inherits something > from HTML.SYM and MATH.SYMBOL (though I'm not clear what). How does the > content of SYMBOL relate to either of its two base classes? When an HTML-architecture processor encounters a SYMBOL element, it treats it like an HTML "SYM" element (which does not exist AFAIK, so this would probably be an error). When a MATH-architecture processor encounters a SYMBOL element (in a document conforming to MYDTD) it treats it like a SYMBOL element (as defined in the MATH meta-DTD). --Joe English jenglish@c... xml-dev: A list for W3C XML Developers Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ To unsubscribe, send to majordomo@i... the following message; unsubscribe xml-dev List coordinator, Henry Rzepa (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
|