[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] xs:assert and Schematron
- From: Rick Jelliffe <rjelliffe@allette.com.au>
- To: James Clark <jjc@jclark.com>
- Date: Tue, 16 Dec 2008 15:43:18 +1100
James Clark wrote:
>> 1) XSD 1.1 draft allows implementers to only provide a subset of XPath for
>> the assertion tests.
>>
>
> The last call draft says
>
> "The major revisions since the previous draft include the following:
> ...The minimal subset of XPath which processors were required to
> support for assertions has been eliminated; processors must support
> all of XPath."
>
That is what the status comments says.
But the normative text does not reflect that. Hence the quotes I gave
(which were from http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/
which is the most recent version on the W3C website
from which James quotes.)
What it appears to give on one hand, it seems to take away with the
other. You have to add up the pieces. The statement in the scope section
that James mentions is only true by heroic squinting, as far as I can
see, though I admit to not having a good track record at the mentalism
needed to read that spec. (The only sensible way I can reconcile the
statement in the scope against s3.13.1 in particular is if they mean,
somehow, that they are not defining an explicit official subset of XPath
but a range of allowed implementations where the minimal subset is
merely an end-point not a conformance milestone.)
3.13.1
Conforming processors may implement all of [XPath 2.0]
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#bib-xpath2> or may
restrict themselves to the subset described below. Interoperability
among all conforming implementations is best achieved by restricting
XPath expressions to the subset. In the minimum subset:
*
Path steps are restricted to only match information items within
the element being ·assessed·
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#key-va>.
*
XPath predicates
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-predicate> are
restricted to only match information items within the element on
which the predicates
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-predicate> are
applied.
*
Operations are limited to those defined in this specification. For
example, comparison of ·actual values·
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#key-vv> is
supported, while general comparison, addition and multiplication
are not.
*
Functions are also limited to those whose semantics is within the
scope of this specification.
3.13.4.1-1-1.3
*Note:* It is a consequence of this construction that attempts to refer,
in an assertion, to the siblings or ancestors of E, or to any part of
the input document outside of E itself, will be unsuccessful.
3.13.4.2
An XPath Expression
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#x> property record
X, with a context node E, is evaluated as defined in [XPath 2.0]
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#bib-xpath2>, with
a static context
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-static-context> as
described in XPath Valid (§3.13.6.2)
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#xpath-valid>
(unless otherwise specified elsewhere) and with the following dynamic
context
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-dynamic-context>
(again, unless otherwise specified elsewhere):
1 The context item
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-context-item> is E.
2 The context position
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-context-position> is 1.
3 The context size
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-context-size> is 1.
4 The variable values
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-variable-values> is
the empty set.
5 The function implementations
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-function-implementation>
include an implementation of every function in the function signatures
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-function-signature>
of the static context
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-static-context>. See
XPath Valid (§3.13.6.2)
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#xpath-valid>.
6 The current dateTime
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-date-time> is
·implementation-defined·
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#key-impl-defined>,
but is constant during an ·assessment·
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#key-va> episode.
7 The implicit timezone
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-timezone> is
·implementation-defined·
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#key-impl-defined>,
but is constant during an ·assessment·
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#key-va> episode.
8 The available documents
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-available-docs> is
the empty set.
9 The available collections
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-available-collections>
is ·implementation-defined·
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#key-impl-defined>.
10 The default collection
<http://www.w3.org/TR/2007/REC-xpath20-20070123/#dt-default-collection>
is ·implementation-defined·
<http://www.w3.org/TR/2008/WD-xmlschema11-1-20080620/#key-impl-defined>.
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]