You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Mihlfried, Adam" <am...@emscharts.com> on 2004/07/06 19:42:36 UTC
RE: cvc-elt.1: Cannot find the declaration of element 'EMSDataSet'. - RESOLVED
Cancel this. The correct configuration was:
XML:
<EMSDataSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.nemsis.org" xsi:schemaLocation="http://www.nemsis.org/XSD/EMSDataSet4.xsd">
XSD:
Same
*** Code: (this was the change needed)
http://apache.org/xml/properties/external-noNamespaceScemaLocation, http://www.nemsis.org http://www.nemsis.org/XSD/EMSDataSet4.xsd)
That is, both the schemaLocation URL and the xmlns URL (or is it the namespace URL that matters?). If anyone has an idea why (I couldn't find this anywhere) please reply.
Thanks.
Adam C. Mihlfried
Software Developer
Center for Emergency Medicine
10 Allegheny County Airport, West Mifflin, PA 15122
Email: amihlfried@emscharts.com
-----Original Message-----
From: Mihlfried, Adam
Sent: Friday, July 02, 2004 5:08 PM
To: xerces-j-user@xml.apache.org
Subject: cvc-elt.1: Cannot find the declaration of element 'EMSDataSet'.
I researched everywhere I could but cannot find the mistake when I receive this error:
cvc-elt.1: Cannot find the declaration of element 'EMSDataSet'.
Here are some details.
1) My "NHTSA12190.xml" file begins like this:
<EMSDataSet xmlns="http://www.nemsis.org" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://www.nemsis.org/XSD/EMSDataSet4.xsd">
<Header>
<D01_01>123</D01_01>
<D01_03>42</D01_03>
2) My "EMSDataSet4.xsd" document begins like this:
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="http://www.nemsis.org" xmlns="http://www.nemsis.org" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="E00_ReferenceTables.xsd" />
<xs:include schemaLocation="E01_RecordInformation.xsd" />
<xs:include schemaLocation="E02_UnitAgencyInformation.xsd" />
3) In my code I am setting thte Features:
"http://xml.org/sax/features/validation", true);
"http://apache.org/xml/features/validation/schema", true
"http://apache.org/xml/features/validation/schema-full-checking, true
and Properties:
http://apache.org/xml/properties/external-noNamespaceScemaLocation, "D:\InetPub_Vault\emsi_mx\xml\EMSDataSet4.xsd" (I've also tried not setting this property)
Thanks!
Adam C. Mihlfried
Software Developer
Center for Emergency Medicine
10 Allegheny County Airport, West Mifflin, PA 15122
Email: amihlfried@emscharts.com
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
Re: cvc-elt.1: Cannot find the declaration of element 'EMSDataSet'. - RESOLVED
Posted by Jeehong Min <je...@parasoft.com>.
Adam,
Since you may be a fellow Steelers fan, I'll give your question a shot.
1) I think you should set up your parser with a different property via:
parser.setProperty("http://apache.org/xml/properties/external-SchemaLocation
",
"http://www.nemsis.org D:\InetPub_Vault\emsi_mx\xml\EMSDataSet4.xsd")
This tells the parser to look for the schema with targetNamespace
"http://www.nemsis.org" in the location "D:\...".
2) Then, you should not need to include the xsi:schemaLocation attribute in
your XML instance document.
Hope that helps.
Jeehong Min
SOAPtest Development
ParaSoft
----- Original Message -----
From: "Mihlfried, Adam" <am...@emscharts.com>
To: <xe...@xml.apache.org>
Sent: Tuesday, July 06, 2004 10:42 AM
Subject: RE: cvc-elt.1: Cannot find the declaration of element
'EMSDataSet'. - RESOLVED
Cancel this. The correct configuration was:
XML:
<EMSDataSet xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.nemsis.org"
xsi:schemaLocation="http://www.nemsis.org/XSD/EMSDataSet4.xsd">
XSD:
Same
*** Code: (this was the change needed)
http://apache.org/xml/properties/external-noNamespaceScemaLocation,
http://www.nemsis.org http://www.nemsis.org/XSD/EMSDataSet4.xsd)
That is, both the schemaLocation URL and the xmlns URL (or is it the
namespace URL that matters?). If anyone has an idea why (I couldn't find
this anywhere) please reply.
Thanks.
Adam C. Mihlfried
Software Developer
Center for Emergency Medicine
10 Allegheny County Airport, West Mifflin, PA 15122
Email: amihlfried@emscharts.com
-----Original Message-----
From: Mihlfried, Adam
Sent: Friday, July 02, 2004 5:08 PM
To: xerces-j-user@xml.apache.org
Subject: cvc-elt.1: Cannot find the declaration of element 'EMSDataSet'.
I researched everywhere I could but cannot find the mistake when I receive
this error:
cvc-elt.1: Cannot find the declaration of element 'EMSDataSet'.
Here are some details.
1) My "NHTSA12190.xml" file begins like this:
<EMSDataSet xmlns="http://www.nemsis.org"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.nemsis.org/XSD/EMSDataSet4.xsd">
<Header>
<D01_01>123</D01_01>
<D01_03>42</D01_03>
2) My "EMSDataSet4.xsd" document begins like this:
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="http://www.nemsis.org"
xmlns="http://www.nemsis.org" xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:include schemaLocation="E00_ReferenceTables.xsd" />
<xs:include schemaLocation="E01_RecordInformation.xsd" />
<xs:include schemaLocation="E02_UnitAgencyInformation.xsd" />
3) In my code I am setting thte Features:
"http://xml.org/sax/features/validation", true);
"http://apache.org/xml/features/validation/schema", true
"http://apache.org/xml/features/validation/schema-full-checking, true
and Properties:
http://apache.org/xml/properties/external-noNamespaceScemaLocation,
"D:\InetPub_Vault\emsi_mx\xml\EMSDataSet4.xsd" (I've also tried not setting
this property)
Thanks!
Adam C. Mihlfried
Software Developer
Center for Emergency Medicine
10 Allegheny County Airport, West Mifflin, PA 15122
Email: amihlfried@emscharts.com
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org