XPath built-in datatype

From http://lists.w3.org/Archives/Public/www-svg/2000Apr/0014.html

Dan Connolly wrote:

> For more complex stuff (e.g. xpath notation), the schema spec doesn't
> provide any mechanism to express that syntax.

Chris Lilley wrote:
Pity.

It would seem a minimal burden to add a built-in datatype that allows you to declare an attribute (or element content) as conceptually being an XPath.  Since XPath is intended to be used across W3C
technologies, it would seem that the best place for it would be as a built-in type in Schema instead of every technology that uses it trying to kludge it with their own regular expressions.

<datatype base="string" name="XPath"/>

The difficulty is in the implied validation a schema aware processor is expected to do when it encounters an attribute that uses an XPath or derived datatype (in the same manner the parser is
anticipated to validate that a uri or Qname is valid beyond what is in the explicit Schema for Schema definitions).  If that seems like too much complexity, you could except conforming processors from
doing any implied validation of XPath's.  But compared to the overall complexity of Schema, an XPath type validation seems fairly trivial.
	

Received on Thursday, 6 April 2000 13:50:01 UTC