OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] Relax-NG schema design question

[ Lists Home | Date Index | Thread Index ]

Hi David,

So, what should I make of the statement from the link I've quoted? It 
says: (http://books.xmlschemata.org/relaxng/ch17s02.html#id2877724)
---
List patterns cannot have any of these descendants: list, ref (because 
after simplification, access to elements is done using references to 
named patterns), attribute, or text. The interleave pattern is also 
forbidden as a descendant of list patterns because it would complicate 
implementations.
---

Is this simply a factual error? It sounds to me, as if the validator 
wouldn't be required to check, what the ref actualy is after 
simplification. The mere fact, that it _could_ be illegal after 
simplification, seems to impose the constraint here.

The relax-ng spec does also mention 'list//ref' as being explicitly 
forbidden in 10.2.4

In my current understanding, waiting for simplification before deciding 
on an error makes sense; but is that just a practice used by some 
validators, or is this the behaviour defined by the specification?

Thanks for your help...
~Lars

David Tolpin wrote:
> Hi Lars,
> 
> It's a bug in xmllint. The restriction you mention must be applied
> after simplification; in the simplified form the values are substituted
> into the list, and there are no references.
> 
> The restriction basically means that elements cannot be inside
> lists.
> 
> David
> 
> 
>>Only the fact, that xmllint reported "element ref: Relax-NG parser 
>>error: Found forbidden pattern list//ref" made us aware of the fact, 
>>that relax-ng in fact constraints the use of refs in lists. 
>>(http://books.xmlschemata.org/relaxng/ch17s02.html#id2877724)


-- 
Lars Oppermann <lars.oppermann@sun.com>               Sun Microsystems
Software Engineer - StarOffice                           Sachsenfeld 4
Phone: +49 40 23646 959                                D-20097 Hamburg
Fax:   +49 40 23646 550                  http://www.sun.com/staroffice




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS