Hello,
Pls give me some ideas to handle this scenario:
I'm trying to validate an XML file against XSD using 8.5 xml stage,
but XSD location is not showing up in the xml file which fails the validation.
If i include that XSD path in the XML file manually - its getting validated.
Is there anywhere in particular i need to include this XSD path in the XML stage or define it somewhere in the XSD itself - so that it gets included in the created XML file?
Thank you all in advance.
Sai
XML Stage 8.5
Moderators: chulett, rschirm, roy
It "sounds" like you are using the xmlInput Stage. This stage finds the xsd according to the value in the header. I recall issues in the past when the value of SchemaLocation had to be the Project directory, but in either case, the value always has to be "in the header" in order for it to find the xsd.
If you don't have xsd's indicated in the header, one solution is to "zap" them in upstream, inside a transformer...but success of that will largely depend on the size of the document and how much can fit into a regular longvarchar column to be transformed as a normal string.
Another option is to not use xmlInput and to start using the xml stage. The xml stage relies on xsd's for all of its functionality. You import the xsd initially and then develop your Assembly. Then the "imported" xsd becomes the one that dictates validation processing.
Ernie
If you don't have xsd's indicated in the header, one solution is to "zap" them in upstream, inside a transformer...but success of that will largely depend on the size of the document and how much can fit into a regular longvarchar column to be transformed as a normal string.
Another option is to not use xmlInput and to start using the xml stage. The xml stage relies on xsd's for all of its functionality. You import the xsd initially and then develop your Assembly. Then the "imported" xsd becomes the one that dictates validation processing.
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>
As noted earlier, you can opt to use the new XML Staqe. If you do so, forget about the header in your xml document. You import "the" xsd as part of the design process. That xsd, which is imported via the Library Manager, will guide your entire design of the Assembly, and control your validation at runtime. You won't be using the header details at all.
If you need "dynamic" validation options, that change with every document instance that comes in, then use xmlInput and the old pack. If you need the performance that you gain from the new pack, as well as increase size capabilities, more granular control on validation, and other goodies (in addition to a lot more capability in the "writing" of xml), use the new xml Stage.
Ernie
If you need "dynamic" validation options, that change with every document instance that comes in, then use xmlInput and the old pack. If you need the performance that you gain from the new pack, as well as increase size capabilities, more granular control on validation, and other goodies (in addition to a lot more capability in the "writing" of xml), use the new xml Stage.
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>