Creating a Schema With two occurrences of the same componen
This should cover W3C XML Schema, Relax NG and DTD related problems.
-
- Posts: 5
- Joined: Mon Aug 13, 2007 1:04 pm
Creating a Schema With two occurrences of the same componen
Post by carol.aboody »
Hello all,
Hope you could help me.
I have to validate an XML file using an XSD schema.
The problem is that the XML contains the same name, "isavail ", in 2 different uses.
I can't change the XML, how can I validate it?
My XML file looks like this:
My XSD schema looks like this:
when i try validating it i get this message:
sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurrences of ',isavail'.
Any suggestions?
Thanks,
Carol
Hope you could help me.
I have to validate an XML file using an XSD schema.
The problem is that the XML contains the same name, "isavail ", in 2 different uses.
I can't change the XML, how can I validate it?
My XML file looks like this:
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1" ?>
<isavail rc="0" service="invitation">
< isavails>
< isavail invid="64834" status="valid"/>
</ isavails>
</ isavail >
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<!--W3C Schema generated by XMLSpy v2007 sp2 (http://www.altova.com)-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name=" isavails ">
<xs:complexType>
<xs:sequence>
<xs:element ref=" isavail"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name=" isavail">
<xs:complexType>
<xs:sequence>
<xs:element ref=" isavails" minOccurs="0"/>
</xs:sequence>
<xs:attribute name="status" type="xs:string"/>
<xs:attribute name="service" type="xs:string"/>
<xs:attribute name="rc" type="xs:int"/>
<xs:attribute name="invid" type="xs:long"/>
</xs:complexType>
</xs:element>
</xs:schema>
when i try validating it i get this message:
sch-props-correct.2: A schema cannot contain two global components with the same name; this schema contains two occurrences of ',isavail'.
Any suggestions?
Thanks,
Carol
-
- Posts: 5
- Joined: Mon Aug 13, 2007 1:04 pm
It's not a space problem
Post by carol.aboody »
I'm sorry, I'm new to XML world..
I'm trying to validate the file with JDOM Object (JAVA application), not XMLSPY.
The spaces are not present in the XSD file , only in this msg (copy-paste problem..)
Do you have any more ideas?
I'm trying to validate the file with JDOM Object (JAVA application), not XMLSPY.
The spaces are not present in the XSD file , only in this msg (copy-paste problem..)
Do you have any more ideas?
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service