Daniel,
Le lundi 21 mai 2007 à 12:30 +0100, Daniel Mahler a écrit :
> Section 7.2 of the spec contains the rules
>
> (group complex)
> groupable(complex( ), complex( ))
>
> (ref)
> <ref name="ln"/> :c complex( )
>
> (group)
> p1 :c ct1 p2 :c ct2 groupable(ct1, ct2)
> ----------------------------------------------------------------------
> <group> p1 p2 </group> :c max( ct1, ct2 )
>
>
> (element)
> deref(ln) = <element> nc p </element> not(p :c ct)
> --------------------------------------------------------------------------
> incorrectSchema()
>
> This prohibits rules like
>
> a = element b { "x", "y"}
>
> However, according to my readin of 7.2,
> one get get around this using indirection:
>
> a = element b { x, y}
> x = "x"
> y = "y"
>
> the point being that the x and y patterns in are complex,
> since all refs are complex,
> so the above should be a valid schema.
>
> I do not believe that the spec intended to leave such a loophole,
> and indeed jing raises the same error for both schema.
> However, my reading of the spec says the second version is legal.
>
> There are 3 possibilities:
> 1. my understanding of 7.2 is wrong
> the most probable, but i'd like to understand why I'm wrong
>
> 2. jing is wrong
>
> 3. the spec is "wrong"
>
> can someone tell me which it is,
> and if it is 1. explain why.
RELAX NG operates on the XPath 1.0 data model and there is not such a
thing in XPath 1.0 as string sequences (there are only string nodes and
if you write <b>xy</b> you have a single text node ("xy") and no string
sequences.
Why does the spec mention string sequences then?
String sequences only exist when strings are split by a "list" pattern.
The split is always done against whitespaces and, with a list pattern, a
value such as "x y" is considered as a sequence of two strings ("x" and
"y").
In other words, using string sequences out of the context of a list
pattern is always an error.
Hope this helps.
Eric
> thanks
> Daniel
>
>
>
> Yahoo! Groups Links
>
>
>
>
--
GPG-PGP: 2A528005
Curious about Relax NG? Read my book online.
http://books.xmlschemata.org/relaxng/
------------------------------------------------------------------------
Eric van der Vlist http://xmlfr.org http://dyomedea.com
(ISO) RELAX NG ISBN:0-596-00421-4 http://oreilly.com/catalog/relax
(W3C) XML Schema ISBN:0-596-00252-1 http://oreilly.com/catalog/xmlschema
------------------------------------------------------------------------
signature.asc
Description: Ceci est une partie de message numériquement signée
