[dsdl-discuss] Re: DSDL Part 5 (DTLL)

From: Alex Brown <alexb@griffinbrown.co.uk>
Date: Thu Mar 09 2006 - 09:14:29 UTC

Rick hi

I imagined (1) being the way to do it ...

Another question is how to tell the Schematron implementation which DTLL
instance(s) to load.

I'm curious - is DTLL _really_ implementable in XSLT 2.0? The
extended-regex-parse-to-XML-fragment thing would be a killer wouldn't
it?

- Alex.

> -----Original Message-----
> From: dsdl-discuss-bounce@dsdl.org
> [mailto:dsdl-discuss-bounce@dsdl.org] On Behalf Of Rick Jelliffe
> Sent: 09 March 2006 06:20
> To: dsdl-discuss@dsdl.org; schematron-love-in@eccnet.com
> Subject: [dsdl-discuss] DSDL Part 5 (DTLL)
>
> ISO DTTL is based on Jeni Tennison's ideas for defining data
> type libraries using properties. DTTL would be a good
> companion to Schematron:
> * use standard type libraries developed for RELAX NG or XSD
> compatability for free
> * reduce the number of home-made assertions
> * implementable on top of XSLT 2, so may be low-hanging fruit
>
> I am wondering on the best way to go about it:
>
> 1) Extension function that can validate a type
>
> <sch:rule context="eg">
> <sch:assert test="dt:validate(@date, 'types:japanese_date')" >
> The date attribute should be a Japanese date.
> </sch:assert>
> </sch:rule>
>
> Pro: fits into XSLT extension function mechanism. Just
> exended query language binding
> Con: fails on XSLT 1 systems
>
> 2) Foreign attribute
>
> <sch:rule context="eg">
> <sch:assert test="true()" subject="@date"
> dt:type="types:japanese_date" >
> The date attribute should be a Japanese date.
> </sch:assert>
> </sch:rule>
>
> Pro: doesnt fail on XSLT 1 implementations, declarative,
> exploits @subject, clean,
> fits in with the idea that we are not assigning type to the
> context--the context is just a convenient pivot
> Con: test="true()" looks funny
>
> 3) Foreign element
>
> <sch:rule context="eg/@date">
> <sch:assert test="true()"><!--satisfy content model--></sch:assert>
> <dt:datatype type="types:japanese_date" /> </sch:rule>
>
> <sch:rule context="eg/@date">
> <sch:assert test="true()"><!--satisfy content model--></sch:assert>
> <dt:datatype library="xtypes.dtl"
> type="types:japanese_date" /> </sch:rule>
>
> Pro: clean, doesn't fail on XSLT 1 implementations
> Con: extra assert to satify content model is ugly, looks
> like a type
> assignment to the context which is not the way to go
>
> I favour 2) so far. Any ideas?
>
> Cheers
> Rick Jelliffe
> --
> 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)
>
>

--
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:14:02 2006

This archive was generated by hypermail 2.1.8 : Wed Apr 12 2006 - 14:48:02 UTC