FW: Jing & Trang errors when processing RNC grammar
"Hutchison, Ben" <[email protected]> Wed, 28 Apr 2004 09:14:53 +1000
| Newsgroups | gmane.text.xml.relaxng.general |
|---|---|
| Message-ID | <C321DD3E9458D5118BB90008C786C7F9106B80CA@cw-exg-srv01.pacificaccess.com.au> |
-----Original Message----- From: Hutchison, Ben Sent: Tuesday, 27 April 2004 3:26:pm To: '[email protected]' Subject: Jing & Trang errors when processing RNC grammar Hello, I am considering using RelaxNG for describing the structure of XML configuration files used in a enterprise software system, because its syntax seems far more intutive than Schemas. I have developed a grammar by reading the RelaxNG tutorial, but when I attempt to validate it using Jing (within OxygenXML) I get an brief error message I cannot understand: E "oneOrMore" contains "group" contains "attribute" When I use the inbuilt Trang tool, I can successfully convert the compact grammar to XML form, but a conversion on to XML Schema results in a message like "Choice between attributes and children cannot be presented; approximating", but no schema object is produced. There doesn't seem to be any reference or further explanation for parsing errors. I have spent several hours on this and will have to abandon the use of RelaxNG unless I can obtain a speedy resolution. My grammar is shown below, including a leading * indicating the line the validator fails on. Note that it relates to the only case of recursion in the grammar- a ConfigGroup can contain nested ConfigGroups within it. Is anyone able to offer some explanation as to what these problems mean? Any general advice on how to "debug" a RelexNG grammar would also be appreciated. Regards Ben Hutchison ================================ namespace rng = " http://relaxng.org/ns/structure/1.0 <http://relaxng.org/ns/structure/1.0> " datatypes xsd = " http://www.w3.org/2001/XMLSchema-datatypes <http://www.w3.org/2001/XMLSchema-datatypes> " start = element ConfigRoot { ConfigGroup* } NamedElementAttributes = attribute name { text }, attribute platform { text }? StringValue = element StringValue { xsd:string } IntValue = element IntValue { xsd:integer } FloatValue = element FloatValue { xsd:float } BooleanValue = element BooleanValue { xsd:boolean } PrimitiveValue = (StringValue | IntValue | FloatValue | BooleanValue) Map = element Map { (MapEntry)* } MapEntry = element MapEntry { PrimitiveValue } Array = element Array { (PrimitiveValue)* } ConfigValue = ( PrimitiveValue | Map | Array ), NamedElementAttributes ConfigGroupEntry = (ConfigGroup | ConfigValue) ConfigGroup = element ConfigGroup { ConfigGroupEntry*, NamedElementAttributes } 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] 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