Daniel Cazzulino wrote:
> I agree. 1 is better, and is easier to implement on non-XSLT
> implementations, I think. It looks more natural and along the lines of
> what we're already used to with EXSLT extensions...
Should we use the same mechanism for datatypes defined using DTTL
schemas and for the XSD built-in dataypes?
So
dttl:validate( @date, jp:japanese_date )
dttl:validate( @date, xs:date )
where
* an XSLT2 implementation might implement both using DTTL
transformation and
* a C#/Java/C++ implementation might implement the first using a regex
library and the second
by calling the appropriate datatype-checker in its native XSD API
DTTL probably does not sustain all the semantics of XSD datatypes. It
would cause some confusion sometime if the Xpath2 implementation caught
fewer errors than the non-XSLT2 implementions. But should that really be
a killer?
Schema people traditionally place a high value on certainty: all
conforming implementations should produce the same objective answer when
validating. Of course, it all falls apart a little when dealing with
regex classes and Unicode and XML1.0 v XML 1.1 and anything that
evolves. But users live with it.
I don't see the harm (except to expectations) of saying that where a
DTTL library models the type constraints of an public external
typesystem, an implementation is free to validate using some internal
library rather than the DTTL schema. This is really an exception
applying to XSD datatypes only at the moment. From the user's POV, they
are invoking DTTL type library. From the implementer's POV they are not
using the DTTL type library (and, indeed, they may decide only to
support the XSD types first.)
That seems to give the most freedom to implementers.
From the ISO DSDL part 5 ISO DTTL POV, I guess what we might be looking
at is
* The addition in part 10.3 of a new function, such as dt:validate(
node(s), type) returning boolean
Someone could have a better function name for this.
* A 1-page normative annex, with 1 or 2 paragraphs, called "Using ISO
DTTL with ISO Schematron"
Saying "Use it as a function in assertion test only. Define
namespace prefix in ns: elements. Assertion fails with error if function
is not available from implementation. " and then example with XSD
library and non XSD library.
Cheers
Rick
-- DSDL members discussion list To unsubscribe, please send a message with the command "unsubscribe" to dsdl-discuss-request@dsdl.org (mailto:dsdl-discuss-request@dsdl.org?Subject=unsubscribe)Received on Thu Mar 9 10:05:36 2006
This archive was generated by hypermail 2.1.8 : Wed Apr 12 2006 - 14:48:02 UTC