I have an XML posted to our Site, it looks like the customer cut it and post it from IE ( it has minus signs outside of the elements tags), and it cause an error beyond WM
-
for XMLSPY its not a well formed XML
-
For TN its a good XML that I used to define docType
and then test it for recognition without any issue -
For Developer the validate schema has no errors despite the minus signs
The issue is that, for partners who will get the minus sign will not be able to handle it if they don’t have WM
Any idea how to make validation fail, or remove these extras.
Thanks,
Mohammad.
To recreate the issue → I have created a sample, “based on the schema listed at the end”
And that sample passed validation
<?xml version="1.0" encoding="UTF-8" ?>
- <!-- Sample XML file generated by XMLSPY v2004 rel. 3 U ([URL="http://www.xmlspy.com"]http://www.xmlspy.com[/URL])
-->
- <SampleDoc xmlns="urn:transaction-schema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:transaction-schema C:\temp\SampleSchema.xsd">
- <Information>
<Name>SoemOneName</Name>
<Address>1600 International Dr</Address>
</Information>
</SampleDoc>
and I used it to create a TN DocumentType and then test it, and it passed the recognition without any problem ( version is 6.5)
here is the schema
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs=“XML Schema” xmlns=“urn:transaction-schema” elementFormDefault=“qualified” targetNamespace=“urn:transaction-schema”>
<xs:simpleType name=“FNameType”>
<xs:restriction base=“xs:string”>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name=“AddressType”>
<xs:restriction base=“xs:string”>
</xs:restriction>
</xs:simpleType>
<xs:complexType name=“InformationType”>
xs:sequence
<xs:element name=“Name” type=“FNameType” minOccurs=“1” maxOccurs=“1”/>
<xs:element name=“Address” type=“AddressType” minOccurs=“1” maxOccurs=“1”/>
</xs:sequence>
</xs:complexType>
<xs:element name=“SampleDoc”>
xs:complexType
xs:sequence
<xs:element name=“Information” type=“InformationType” minOccurs=“1” maxOccurs=“10”/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>