> Martin Bryan said:
> > Danger signals! SVG requires not just lists, but pairs, where there
> > sometimes needs to be a match between numbers in consecutive pairs.
> > Validation of such lists/arrays gets really problematical.
Actually, I don't believe so, and that is why I think the possibilities are
exciting. This is exactly where we can have substantial benefit at
low cost, compared to W3C XML Schemas.
For example, in my suggestion, validating
<a b="0 1 2 3 4 5"/>
against the constraint that the odd numbers are in ascending order and the
even numbers are in ascending order (e.g. it could be an increasing line) would
involve the steps
1) Select the attribute value and send as XML document named
by the type of the b attribute
<eg:ascendingList>0 1 2 3 4 5</eg:ascendingList>
2) Tokenize based on spaces and treat as numbers
<dsdl:seq type="eg:ascendingList">
<dsdl:number>0</dsdl:number>
<dsdl:number>1</dsdl:number>
<dsdl:number>2</dsdl:number>
<dsdl:number>3</dsdl:number>
<dsdl:number>4</dsdl:number>
<dsdl:number>5</dsdl:number>
</dsdl:seq>
3) Validate the relationship with the Schematron rule
<rule context="*[@type="eg:ascending:List]/dsdl:number[position() > 2]">
<assert test="
number(dsdl:number[position () = current()/position()-2]/text())
< number(text())"
>Odd and even values should be in ascending order</assert>
</rule>
So the selection is trivial. The tokenizing is trivial. And the Schematron
schema is no particular stretch.
I will put up a more clear strawman, also responding to Eric's.
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)Received on Wed May 29 04:19:23 2002
This archive was generated by hypermail 2.1.8 : Fri Dec 03 2004 - 14:00:27 UTC