RE: FW: Jing & Trang errors when processing RNC gr ammar
"Hutchison, Ben" <[email protected]> Wed, 28 Apr 2004 11:06:02 +1000
| Newsgroups | gmane.text.xml.relaxng.general |
|---|---|
| Message-ID | <C321DD3E9458D5118BB90008C786C7F9106B80CC@cw-exg-srv01.pacificaccess.com.au> |
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:[email protected]] ... > 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] _______________________________________________ relaxng-user mailing list [email protected] http://relaxng.org/mailman/listinfo/relaxng-user