[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Question on ANY (its use in RDF)
I have a question about the ANY type. It is my understanding that an element defined to be of type ANY can contain any element that is defined *within* the DTD (i.e., it cannot use elements that are not defined in the DTD). Correct? Consider the RDF.dtd (at bottom). It defines an element rdf:Description that is of type ANY. Here is an example RDF XML document: <?xml version="1.0"?> <!DOCTYPE rdf:RDF SYSTEM "RDF.dtd"> <rdf:RDF xmlns:cat="http://db2.ibm.com" xmlns:rdf="http://www.w3.org/schemas/rdf-schema"> <rdf:Description about="http://db2.ibm.com/catalogs"> <cat:tables> <rdf:Bag> <rdf:li> <rdf:Description><systables cat:tname="SYSTABLES" cat:owner="SYSIBM " cat:colnos="38"/></rdf:Description> </rdf:li> <rdf:li> <rdf:Description><syscolumns cat:tname="SYS < COLUMNS" cat:owner="SYSIBM " cat:colnos="34"/></rdf:Description> </rdf:li> </rdf:Bag> </cat:tables> </rdf:Description> </rdf:RDF> How can rdf:Description contain the element cat:tables? It is not defined in rdf.dtd. I thought that ANY says that the element can contain any elements defined *within* the DTD? /Roger Here is RDF.dtd: <!ENTITY % container "( rdf:Seq | rdf:Bag | rdf:Alt )"> <!ENTITY % rdfObj "( rdf:Description | %container; )"> <!ELEMENT rdf:RDF ( %rdfObj; )* > <!ENTITY % property "ANY"> <!ELEMENT rdf:Description %property;> <!ATTLIST rdf:Description ID NMTOKEN #IMPLIED about CDATA #IMPLIED aboutEach CDATA #IMPLIED bagID NMTOKEN #IMPLIED > <!ENTITY % collmember "rdf:li"> <!ELEMENT rdf:Seq ( %collmember; )*> <!ATTLIST rdf:Seq ID NMTOKEN #IMPLIED> <!ELEMENT rdf:Bag ( %collmember; )*> <!ATTLIST rdf:Bag ID NMTOKEN #IMPLIED> <!ELEMENT rdf:Alt ( %collmember; )+> <!ATTLIST rdf:Alt ID NMTOKEN #IMPLIED> <!ENTITY % value "( %rdfObj; | PCDATA )"> <!ELEMENT rdf:li ( %value; )> <!ATTLIST rdf:li resource CDATA #IMPLIED> 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
|