Hi,
I'm trying to validate XML document against it's defined rules. Here is the job layout.
Folder ---> XML Input ---> Seq File.
I've tried with Validate XML input (General/Strict) but didn't get the results.
I've tried with Log rejected Error option. Didn't get the expected results.
Then I went through the XMLPACK_20_Designer.pdf file and include the XSD in the XML document's root element as follows.
<Chains xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com C:\CR\Chains.xsd">
Even I mentioned the schema loaction in the XML, it didn't validate.
Here is my validation rule :
All the TranType except 'A' and 'C' should be rejected.
<xs:element name="TranType">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:enumeration value='"A"'/>
<xs:enumeration value='"C"'/>
</xs:restriction>
</xs:simpleType>
</xs:element>
Please provide me details If I missed anything when I'm doing the validation.
Thanks
- U
Validate XML against XSD
Moderators: chulett, rschirm, roy
HI
<Chains xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com C:\CR\Chains.xsd">
In your xml file please do specify the schema location like below and give a try.
<Chains xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="C:\CR\Chains.xsd">
Thanks.
<Chains xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.w3schools.com C:\CR\Chains.xsd">
In your xml file please do specify the schema location like below and give a try.
<Chains xmlns="http://www.w3schools.com"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="C:\CR\Chains.xsd">
Thanks.
Regards
Lotus26
Lotus26
Hi,
I tried that option as well. Here is the error I got;
TestValidateXSD..XML_Input_1: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 39): An exception occurred! Type:TranscodingException, Message:An invalid multi-byte source text sequence was encountered
Thanks
-U
I tried that option as well. Here is the error I got;
TestValidateXSD..XML_Input_1: XML input document parsing failed. Reason: Xalan fatal error (publicId: , systemId: , line: 1, column: 39): An exception occurred! Type:TranscodingException, Message:An invalid multi-byte source text sequence was encountered
Thanks
-U