Alex, here is the complete XML Schema:
<?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://www.ljf.scot.nhs.uk/ljf-1.0" xmlns:ljf="http://www.ljf.scot.nhs.uk/ljf-1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="sections"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="section"/> </xs:sequence> <xs:attribute name="title" use="required"/> </xs:complexType> </xs:element> <xs:element name="section"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" ref="note"/> <xs:element minOccurs="0" maxOccurs="unbounded" ref="choices"/> <xs:element minOccurs="0" maxOccurs="unbounded" ref="dose"/> <xs:element minOccurs="0" maxOccurs="unbounded" ref="prescribing_notes"/> <xs:element minOccurs="0" maxOccurs="unbounded" ref="note"/> </xs:sequence> <xs:attribute name="title" use="required"/> <xs:attribute name="sub-title"/> </xs:complexType> </xs:element> <xs:element name="note"> <xs:complexType mixed="true"> <xs:group minOccurs="0" maxOccurs="unbounded" ref="foreign-nodes"/> <xs:attributeGroup ref="foreign-nodes"/> </xs:complexType> </xs:element> <xs:element name="choices"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="choice_section"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="choice_section"> <xs:complexType> <xs:sequence> <xs:element maxOccurs="unbounded" ref="choice"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="choice"> <xs:complexType mixed="true"> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" ref="title"/> <xs:group minOccurs="0" maxOccurs="unbounded" ref="foreign-nodes"/> </xs:sequence> <xs:attributeGroup ref="foreign-nodes"/> </xs:complexType> </xs:element> <xs:element name="title" type="xs:string"/> <xs:element name="dose"> <xs:complexType mixed="true"> <xs:group minOccurs="0" maxOccurs="unbounded" ref="foreign-nodes"/> <xs:attributeGroup ref="foreign-nodes"/> </xs:complexType> </xs:element> <xs:element name="prescribing_notes"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" ref="adult"/> </xs:sequence> </xs:complexType> </xs:element> <xs:element name="adult"> <xs:complexType> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" ref="note"/> </xs:sequence> </xs:complexType> </xs:element> <xs:group name="foreign-elements"> <xs:sequence> <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/> </xs:sequence> </xs:group> <xs:group name="anything"> <xs:sequence> <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/> </xs:sequence> </xs:group> <xs:attributeGroup name="anything"> <xs:anyAttribute processContents="skip"/> </xs:attributeGroup> <xs:attributeGroup name="foreign-attributes"> <xs:anyAttribute processContents="skip"/> </xs:attributeGroup> <xs:group name="foreign-nodes"> <xs:sequence> <xs:group minOccurs="0" maxOccurs="unbounded" ref="foreign-elements"/> </xs:sequence> </xs:group> <xs:attributeGroup name="foreign-nodes"> <xs:attributeGroup ref="foreign-attributes"/> </xs:attributeGroup> </xs:schema> and here is the original Relax NG schema: <?xml version="1.0" encoding="UTF-8"?> <grammar xmlns="http://relaxng.org/ns/structure/1.0"> <start> <ref name="element-sections"/> </start> <define name="element-sections"> <element name="sections"> <attribute name="title"/> <oneOrMore> <ref name="element-section"/> </oneOrMore> </element> </define> <define name="element-section"> <element name="section"> <attribute name="title"/> <optional> <attribute name="sub-title"/> </optional> <zeroOrMore> <ref name="element-sectional-note"/> </zeroOrMore> <zeroOrMore> <ref name="element-choices"/> </zeroOrMore> <zeroOrMore> <ref name="element-dose"/> </zeroOrMore> <zeroOrMore> <ref name="element-prescribing-notes"/> </zeroOrMore> <zeroOrMore> <ref name="element-sectional-end-note"/> </zeroOrMore> </element> </define> <define name="element-sectional-note"> <element name="note"> <zeroOrMore> <ref name="foreign-nodes"/> </zeroOrMore> </element> </define> <define name="element-choices"> <element name="choices"> <oneOrMore> <ref name="element-choice-section"/> </oneOrMore> </element> </define> <define name="element-choice-section"> <element name="choice_section"> <oneOrMore> <ref name="element-choice"/> </oneOrMore> </element> </define> <define name="element-choice"> <element name="choice"> <zeroOrMore> <ref name="element-choice-title"/> </zeroOrMore> <zeroOrMore> <ref name="foreign-nodes"/> </zeroOrMore> </element> </define> <define name="element-choice-title"> <element name="title"> <text/> </element> </define> <define name="element-dose"> <element name="dose"> <zeroOrMore> <ref name="foreign-nodes"/> </zeroOrMore> </element> </define> <define name="element-prescribing-notes"> <element name="prescribing_notes"> <zeroOrMore> <ref name="element-prescribing-adult"/> </zeroOrMore> </element> </define> <define name="element-prescribing-adult"> <element name="adult"> <zeroOrMore> <ref name="element-prescribing-note"/> </zeroOrMore> </element> </define> <define name="element-prescribing-note"> <element name="note"> <zeroOrMore> <ref name="foreign-nodes"/> </zeroOrMore> </element> </define> <define name="element-sectional-end-note"> <element name="note"> <zeroOrMore> <ref name="foreign-nodes"/> </zeroOrMore> </element> </define> <define name="foreign-elements"> <zeroOrMore> <element> <anyName/> <ref name="anything"/> </element> </zeroOrMore> </define> <define name="anything"> <zeroOrMore> <choice> <element> <anyName/> <ref name="anything"/> </element> <attribute> <anyName/> </attribute> <text/> </choice> </zeroOrMore> </define> <define name="foreign-attributes"> <zeroOrMore> <attribute> <anyName/> </attribute> </zeroOrMore> </define> <define name="foreign-nodes"> <zeroOrMore> <choice> <text/> <ref name="foreign-attributes"/> <ref name="foreign-elements"/> </choice> </zeroOrMore> </define> </grammar> Nic Hemley Lothian NHS Webmaster & Developer internal: 89240 external: 0131 536 9240 int'l: +00 44 131 536 9240 web: www.nhslothian.scot.nhs.uk >>> [EMAIL PROTECTED] 24/11/2004 23:50:11 >>> Nicholas Hemley wrote: > My question is therefore this: is the problem with how Jing has > converted the schema? Nic, Can you please send the complete schema generated by Jing attached to your reply? > My other question is this: can I use namespaces instead of a > 'foreign-nodes' declaration to achieve the same aim? I am not sure what you mean there. You might want to have some constraints on the possible namespace of those foreign nodes, like we have in the XForms schema to allow for foreign attributes on XForms elements: <define name="non-xforms-attributes"> <zeroOrMore> <attribute> <anyName> <except> <nsName ns=""/> <nsName ns="http://www.w3.org/2002/xforms"/> <nsName ns="http://orbeon.org/oxf/xml/xforms"/> </except> </anyName> </attribute> </zeroOrMore> </define> Alex ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ orbeon-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/orbeon-user ********************************************************************** The information contained in this message may be confidential or legally privileged and is intended for the addressee only, If you have received this message in error or there are any problems please notify the originator immediately. The unauthorised use, disclosure, copying or alteration of this message is strictly forbidden. ********************************************************************** ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://productguide.itmanagersjournal.com/ _______________________________________________ orbeon-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/orbeon-user
