Hi,
I am new to Datastage.I have to validate xml against xml schema.In XML guide, it is given that schemaLocation should be given as attribute in the root element of xml document.I have several doubts regarding this.
1)I cant alter the root element of xml input because it is generated by some other application.
2)how can the schemaLocation attribute refers the XSD(xml schema) imported to datastage.
one more issue is, In my xml schema,it refers to another schema as below
<xs:include schemaLocation="http://www.cust.com common.xsd>
I have gone through the topics posted and also the Best practices document.In bestpractices document,xml validation part is not given.In some topics in DSXchange, this problem was dicussed but I didnot understand them.I am using sequential stage to extract xml.
I will be very greatful to You ,if you can provide the detailed procedure to validate xml.
Please help me.
xml
Moderators: chulett, rschirm, roy
Validation should find any included xsd's just fine, although I suspect that you will run into issues when trying to import your meta data (separate topic).
As for validation on the fly, assuming you already have the column meta data that you want, it's rare that the schema location will have detailed disk info.... it's usually just the schema name. So......it may depend on your release and platform, but one of the following should work for your scenario:
a) try placing the schema inside your projects' directory.
b) edit the content as it is passing thru....this is not so easy if the xml document is really large, or if you are in EE where it is preferred to pass in a URL to find the document. But if you are using Folder, have a follow-up transformer that finds and zaps the correct subdirectory information into the schema location value.
Ernie
As for validation on the fly, assuming you already have the column meta data that you want, it's rare that the schema location will have detailed disk info.... it's usually just the schema name. So......it may depend on your release and platform, but one of the following should work for your scenario:
a) try placing the schema inside your projects' directory.
b) edit the content as it is passing thru....this is not so easy if the xml document is really large, or if you are in EE where it is preferred to pass in a URL to find the document. But if you are using Folder, have a follow-up transformer that finds and zaps the correct subdirectory information into the schema location value.
Ernie
Ernie Ostic
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>
blogit!
<a href="https://dsrealtime.wordpress.com/2015/0 ... ere/">Open IGC is Here!</a>