[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Question on ANY (its use in RDF)

  • From: costello@m... (Roger L. Costello)
  • To: xml-dev@i...
  • Date: Sun, 24 Jan 99 10:05:35 -0500

db2 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 &lt; 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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.