[Home] [By Thread] [By Date] [Recent Entries]

  • From: Laura Hatcher <lhatcher@a...>
  • To: xml-dev <xml-dev@l...>
  • Date: Thu, 26 Jul 2001 10:40:17 -0400

I have spent some time researching the issue of how to define keys (that of a database) in XML Schemas.  And I have found a couple of resources.  The XML schema specs state:

        <unique
              id=ID
              name=NCName >
              content: (annotation?, (selector, field+))
        </unique>

        <key
              id=ID
              name=NCName>
              content: (annotation?, (selector, field+))
        </key>

        ...and so on an so forth

        <field
              id=ID
              xpath= {a subset of an xpath expression}>
              content: (annotation?)
        </field>

The thing that bothers me is that the field and selector elements use xpath expression.  I guess my question is, is it necessary to use xpath if you are planning on declaring keys within your schema?  or is there a better way?

<another note>
I want to use a xml document to enter the parsed data into a database and not create a web page and therefore I don't want to use XSLT.  Are there any suggestion on the best way of accomplishing this and maintain the integrity constraints?
</another note>

Thanks in advance,
Laura Hatcher


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member