xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
Re: [XOM-interest] ValidityException: cvc-elt.1: Cannot find the declaration of 'receive'
- From: "Marian, R. (Radu)" <Radu.Marian AT us.ing.com>
- To: "Wolfgang Hoschek" <wolfgang.hoschek AT mac.com>
- Cc: xom-interest AT lists.ibiblio.org
- Subject: Re: [XOM-interest] ValidityException: cvc-elt.1: Cannot find the declaration of 'receive'
- Date: Thu, 30 Nov 2006 08:49:40 -0700
Wolfgang,
Thanks for your quick feedback - setting target namespace to null works!
I am not quite sure what
" target namespace of a schema should match with the instance document"
means.
Can you please send a p2pio.xsd that will work with w3c example at
http://dsd.lbl.gov/nux/api/nux/xom/pool/BuilderFactory.html
Regards,
Radu Marian
Retirement Services Architecture
phone: 860 723-9067
email: radu.marian AT us.ing.com
-----Original Message-----
From: Wolfgang Hoschek [mailto:wolfgang.hoschek AT mac.com]
Sent: Wednesday, November 29, 2006 05:55 PM
To: Marian, R. (Radu)
Cc: xom-interest AT lists.ibiblio.org
Subject: Re: [XOM-interest] ValidityException: cvc-elt.1: Cannot find
the declaration of 'receive'
The target namespace of a schema should match with the instance
document. With your generated schema, try this:
String targetNamespace = null;
schemaLocations.put(new File("/tmp/p2pio.xsd"), targetNamespace);
Wolfgang.
On Nov 29, 2006, at 1:41 PM, Radu wrote:
> Hello,
>
> I am just trying to use the xml schema validation example from
> http://dsd.lbl.gov/nux/api/nux/xom/pool/BuilderFactory.html
> ----------modified source code----------- // W3C XML Schema validation
> Map schemaLocations = new HashMap(); schemaLocations.put(new
> File("/tmp/p2pio.xsd"), "http://dsd.lbl.gov/ p2pio-1.0"); Builder
> builder = new BuilderFactory().createW3CBuilder (schemaLocations);
> Document doc = builder.build(new File("/tmp/p2pio.xml"));
> System.out.println(doc.toXML()); ----------end of modified source code
> ----------
>
> I am getting the following error:
> nu.xom.ValidityException: cvc-elt.1: Cannot find the declaration of
> element 'receive'. at line 1, column 24 in file:///C:/tmp/p2pio.xml
> at nu.xom.Builder$ValidityRequired.error(Builder.java:1260)
> at ...
> -------------
>
> I also couldn't find a matching p2pio.xsd so I generated one:
> ----------
> <?xml version="1.0" encoding="UTF-8"?> <xs:schema
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> elementFormDefault="qualified">
> <xs:element name="receive">
> <xs:complexType>
> <xs:sequence>
> <xs:element ref="transactionID"/>
> <xs:element ref="min"/>
> <xs:element ref="max"/>
> <xs:element ref="timeout"/>
> </xs:sequence>
> <xs:attribute name="mode" use="required" type="xs:NCName"/>
> </xs:complexType>
> </xs:element>
> <xs:element name="transactionID" type="xs:string"/>
> <xs:element name="min" type="xs:integer"/>
> <xs:element name="max" type="xs:integer"/>
> <xs:element name="timeout" type="xs:NMTOKEN"/> </xs:schema>
> -------------
>
> TIA,
> Radu
>
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
---------------------------------------------------------
NOTICE: The information contained in this electronic mail message is
confidential and intended only for certain recipients. If you are not an
intended recipient, you are hereby notified that any disclosure,
reproduction, distribution or other use of this communication and any
attachments is strictly prohibited. If you have received this communication
in error, please notify the sender by reply transmission and delete the
message without copying or disclosing it.
============================================================================================
-
[XOM-interest] ValidityException: cvc-elt.1: Cannot find the declaration of 'receive',
Radu, 11/29/2006
-
Re: [XOM-interest] ValidityException: cvc-elt.1: Cannot find the declaration of 'receive',
Wolfgang Hoschek, 11/29/2006
-
Re: [XOM-interest] ValidityException: cvc-elt.1: Cannot find the declaration of 'receive',
Marian, R. (Radu), 11/30/2006
- Re: [XOM-interest] ValidityException: cvc-elt.1: Cannot find the declaration of 'receive', Wolfgang Hoschek, 11/30/2006
-
Re: [XOM-interest] ValidityException: cvc-elt.1: Cannot find the declaration of 'receive',
Marian, R. (Radu), 11/30/2006
- Re: [XOM-interest] ValidityException: cvc-elt.1: Cannot find the declaration of 'receive', Elliotte Harold, 11/30/2006
-
Re: [XOM-interest] ValidityException: cvc-elt.1: Cannot find the declaration of 'receive',
Wolfgang Hoschek, 11/29/2006
Archive powered by MHonArc 2.6.24.