W3C home > Mailing lists > Public > public-qt-comments@w3.org > March 2005

xpath as primitive type in XML Schema

From: Frank Yung-Fong Tang <franktang@gmail.com>
Date: Mon, 14 Mar 2005 16:25:27 -0500
Message-ID: <2e4dfd690503141325737d5c05@mail.gmail.com>
To: public-qt-comments@w3.org, www-xml-schema-comments@w3.org

Any one aware of any activity that request the XML Schema working
group, or some other working group to define a *standard* 'type' for
element to hold a XPath?

If more and more XML based language use  XPath (such as XML Schema
itself, XSLT and eveutlaly the XQueryX) in the future then there are a
common need for a element of type xpath. It will be nice to add xpath
as a primitive type into the next version of XML Schema Part II
datatype so poeple can use it similar to the way they can use
hexBinary, anyURI, etc to define XML element (or attribute) to contain

Currenlty, several W3C use ad hoc way to define xpath type in their
XML based language

in XML Schema itself
(see reference http://www.w3.org/2001/XMLSchema.xsd )
<xs:attribute name="xpath" use="required">
    <xs:restriction base="xs:token">

in XSLT - http://www.w3.org/TR/xslt

<!ENTITY % pattern "CDATA">

in XSLT2 WD- http://www.w3.org/TR/xslt20/#stylesheets-and-schemas

<xs:simpleType name="expression">
      An XPath 2.0 expression.
  <xs:restriction base="xs:token">
    <xs:pattern value=".+"/>

In http://www.w3.org/TR/xqueryx/
The XPath is repersented by a tree of structure instead of a CDATA. 

Frank Yung-Fong Tang
Šýšţém Årçĥîţéçţ
Received on Monday, 14 March 2005 21:25:58 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:23 UTC