[relaxng-user] FW: Jing & Trang errors when processing RNC gr ammar

Hutchison, Ben Ben.Hutchison at sensis.com.au
Wed Apr 28 11:06:02 ICT 2004


Well, Im impressed by the rapid and authorative responses I have received to
my questions; thanks due to Bob and Makoto. 

Further queries inline below. Apologies if they seem elementary, but Ive no
formal training or prior experience developing grammars/schemas.

> -----Original Message-----
> From: Bob Foster [mailto:bob at objfac.com]
...
> can't be sure it's what the author meant. Why is the platform 
> attribute 
> optional and the name attribute not? Both are optional in the revised 
> version. It is possible the following would be a more faithful fix:

Indeed. I do require a strictly mandatory name attribute, but an optional
platform attribute.
...
> > error message I cannot understand: E "oneOrMore" contains "group" 
> > contains "attribute"
> 
> ConfigGroupEntry* where ConfigGroupEntry has as an alternative 
> ConfigValue, a group that contains a group, 
> NamedElementAttributes, that 
> contains two attributes.

Ok...why is this illegal?
> 
> The "oneOrMore" reference is because * (zeroOrMore) is 
> defined in RELAX 
> NG as +? (optional oneOrMore).

Ah! That was confusing me. I couldn't see any oneOrMore pattern in my
grammar.
> 
> NamedElementAttributes is obviously redundant as it is used, 
> so a simple 
> fix would be to take it out of ConfigValue.

Why is it obviously redundant? I want NamedElementAttributes present on both
ConfigGroups and ConfigValues. Thats why I had specified it in both clauses
of my original (problematic) grammar.

> Trang can't convert everything, esp. an invalid schema, and 
> even if it 
> did the conversion could not be faithful where there is a 
> choice between 
> an attribute and an element. XML Schema can't describe this.

By "choice between an attribute and an element", do you mean a case of
either sub-element OR attributes? I didn't think I had such a case in my
grammar, and I certainly dont mean to.

Thanks
Ben

www.sensis.com.au

A leading Australian advertising, information 
and directories business. 

www.yellowpages.com.au
www.whitepages.com.au
www.citysearch.com.au
www.whereis.com.au
www.telstra.com.au

This email and any attachments are intended only for the use of the recipient and may be confidential and/or legally privileged.
Sensis Pty Ltd disclaims liability for any errors, omissions, viruses, loss and/or damage arising from using, opening or transmitting this email.
If you are not the intended recipient you must not use, interfere with, disclose, copy or retain this email and you should notify the sender immediately by return email or by contacting Sensis Pty Ltd by telephone on [+61 3 9201 4888]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://relaxng.org/pipermail/relaxng-user/attachments/20040428/c3b1395f/attachment.htm


More information about the relaxng-user mailing list