G
Grand Apeiron
Hi all,
i am relatively new to XML and have created my own XML-Schema definition
and an instance XML-Document out of it.
I am working with netbeans-3.51 and the apache xerces XML Parser version
2.6.0.
When i validate the XML-Schema i get no errors.
But when i validate the XML Instance i get errors about missing
attributes and elements which seem to be correctly implemented from
my sight of view.
Please see the validation output and the XML Instance code
to understand what i mean:
---<XML Instance Code
<TBWPacket xmlns='TBWPacket'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='TBWPacket TBWPacket.xsd'
<packet-id>ABC00067</packet-id>
<StandardPacket packet-length="12" packet-type="REQUEST">
<md5sum>0</md5sum>
<resp-for>TRCF0012</resp-for>
<data>
<string field-name='test'>send directory listing</string>
</data>
</StandardPacket>
</TBWPacket>
--->XML Instance Code
---<XML Validation output
Checking
file:/home/ob/programming/java/projects/TarByWire/TarByWire/Protocol/TBWStandardPacketExample.xml...
Referenced entity at
"file:/home/ob/programming/java/projects/TarByWire/TarByWire/Protocol/TBWPacket.xsd".
cvc-complex-type.3.2.2: Attribute 'packet-length' is not allowed to
appear in element 'StandardPacket'. [17]
cvc-complex-type.3.2.2: Attribute 'packet-type' is not allowed to appear
in element 'StandardPacket'. [17]
cvc-complex-type.4: Attribute 'packet-length' must appear on element
'StandardPacket'. [17]
cvc-complex-type.4: Attribute 'packet-type' must appear on element
'StandardPacket'. [17]
cvc-complex-type.2.4.a: Invalid content was found starting with element
'resp-for'. One of '{"":resp-for}' is expected. [19]
cvc-complex-type.3.2.2: Attribute 'field-name' is not allowed to appear
in element 'string'. [21]
cvc-complex-type.4: Attribute 'field-name' must appear on element
'string'. [21]
XML validation finished.
--->XML Validation output
I really have no idea what could cause that problems. I dont even
know if the problem lays in the XML-Schema or the XML-Instance.
I will not include the schema definition here until someone requests it
since it is around 250 lines long.
If anybody has an idea what could cause the shown problem(s) that idea
is highly requested =).
Thanx for any help.
With greetings from germany,
Grand Apeiron
i am relatively new to XML and have created my own XML-Schema definition
and an instance XML-Document out of it.
I am working with netbeans-3.51 and the apache xerces XML Parser version
2.6.0.
When i validate the XML-Schema i get no errors.
But when i validate the XML Instance i get errors about missing
attributes and elements which seem to be correctly implemented from
my sight of view.
Please see the validation output and the XML Instance code
to understand what i mean:
---<XML Instance Code
<TBWPacket xmlns='TBWPacket'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='TBWPacket TBWPacket.xsd'
<packet-id>ABC00067</packet-id>
<StandardPacket packet-length="12" packet-type="REQUEST">
<md5sum>0</md5sum>
<resp-for>TRCF0012</resp-for>
<data>
<string field-name='test'>send directory listing</string>
</data>
</StandardPacket>
</TBWPacket>
--->XML Instance Code
---<XML Validation output
Checking
file:/home/ob/programming/java/projects/TarByWire/TarByWire/Protocol/TBWStandardPacketExample.xml...
Referenced entity at
"file:/home/ob/programming/java/projects/TarByWire/TarByWire/Protocol/TBWPacket.xsd".
cvc-complex-type.3.2.2: Attribute 'packet-length' is not allowed to
appear in element 'StandardPacket'. [17]
cvc-complex-type.3.2.2: Attribute 'packet-type' is not allowed to appear
in element 'StandardPacket'. [17]
cvc-complex-type.4: Attribute 'packet-length' must appear on element
'StandardPacket'. [17]
cvc-complex-type.4: Attribute 'packet-type' must appear on element
'StandardPacket'. [17]
cvc-complex-type.2.4.a: Invalid content was found starting with element
'resp-for'. One of '{"":resp-for}' is expected. [19]
cvc-complex-type.3.2.2: Attribute 'field-name' is not allowed to appear
in element 'string'. [21]
cvc-complex-type.4: Attribute 'field-name' must appear on element
'string'. [21]
XML validation finished.
--->XML Validation output
I really have no idea what could cause that problems. I dont even
know if the problem lays in the XML-Schema or the XML-Instance.
I will not include the schema definition here until someone requests it
since it is around 250 lines long.
If anybody has an idea what could cause the shown problem(s) that idea
is highly requested =).
Thanx for any help.
With greetings from germany,
Grand Apeiron