[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Relax-NG schema design question


found forbidden pattern list ref
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@s...>               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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.