Further to my previous email on the subject of embedding HTML in an XML document, I have now tried the XHTML namespace-enabled version of my schema.
I downloadeded xhtml1-strict.xsd, xml.xsd, XMLSchema.dtd and datatypes.dtd and then have the following in the schema file: <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" xmlns:html="http://www.w3c.org/xhtml/1999" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="../schema/xhtml1-strict.xsd"/> ... <xs:element name="note"> <xs:complexType> <xs:sequence> <xs:element ref="html:html"/> </xs:sequence> </xs:complexType> </xs:element> ... When I run this I get the following error: 2004-11-24 11:58:26,093 ERROR org.orbeon.oxf.pipeline.InitUtils null - Exception with no location data org.iso_relax.verifier.VerifierConfigurationException: {0} at com.sun.msv.verifier.jarv.TheFactoryImpl.parse(TheFactoryImpl.java:44) at com.sun.msv.verifier.jarv.FactoryImpl.compileSchema(FactoryImpl.java:98) which is not too friendly :) Any ideas what I am doing wrong? Cheerio, Nic >>> [EMAIL PROTECTED] 24/11/2004 10:13:56 >>> Hello, I am trying to allow HTML content within nodes of my document and have therefore used a 'foreign-nodes' declaration in a Relax NG schema which is then converted to XML Schema using Jing: Relax NG Schema [snippet] ... define name="element-choice"> <element name="choice"> <zeroOrMore> <ref name="element-choice-title"/> </zeroOrMore> <zeroOrMore> --> here is the usage: <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> And here is a snippet of the generated XML Schema: XML Schema [snippet - generated] ... <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> ... When I try and view the XML in Orbeon I get the following error: Root cause follows. com.sun.msv.verifier.jarv.FactoryImpl$WrapperException: reference to the undefined attribute group: "foreign-attributes" ...which is odd since the definition is there! My question is therefore this: is the problem with how Jing has converted the schema? My other question is this: can I use namespaces instead of a 'foreign-nodes' declaration to achieve the same aim? Cheerio, Nic. ********************************************************************** 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 ********************************************************************** 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
