on 03-06-2006 10:21 AM
Hi,
My scenario is such that whenever a message is outputted by XI it must be validated aganist the schema.I am using XSL mapping in interface mapping. By default the output message is not validating aganist the output schema. As per the suggestions ( for validations ) I done message mapping using graphical mapping editor from source to target. So in interface mapping for Source and target I used two maps one with Message mapping ( graphical) and then XSL mapping. When I am using this type scenario my target file which is a xml file looking like this
<?xml version="1.0" encoding="UTF-8" >
10023 UNITED STATES TECHNICAL
But actually when I am using single mapping either Message Mapping using ( Graphical) OR XSL. The output XML file looks like this.
<?xml version="1.0" encoding="UTF-8" >
<empno>10023<empno>
<country> UNITED STATES</country>
<team> TECHNICAL </team>
which is a correct one. Can anybody suggest to me how to rectify this? I am using mapping (graphical) previous to XSL mapping purely bcoz of XSD validations.
Thaks & Regards,
MM.Rao
Hi Malisetti
A message mapping between the same message types does <i>not</i> validate your messages. It merely makes sure that all mandatory elements are present in the target structure. If you're interested in full XML Schema validation, you might find some inspiration in this weblog entry written by myself:
<a href="/people/morten.wittrock/blog/2006/03/21/validating-messages-in-xi-using-xml-schema">/people/morten.wittrock/blog/2006/03/21/validating-messages-in-xi-using-xml-schema</a>
Cheers,
Morten Wittrock
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Second one is right. But for this you don't need to do two mappings. Either you do XSL mapping or GraphicalMessage Mapping. If you do XSLT mapping it should contain with Namespace. Then I think it will be resolved.
Other option is writing logic in the XSLT mapping. i.e if this node exists then do the rest...somethink like if else logic.
And <xsl:copy-of> will work for entire node.
Regards,
Moorthy
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rao,
If i am not wrong, after doing the validations in xsl your xslt program is reading the value only. Thus it is truncating the node name (xml tags). Thus instead of using statement <b><xsl:value-of select="."/></b> you can use <b><xsl:copy-of select="."></b> which restroes the node as well as its value.
Regards,
KNS Kumar.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
81 | |
10 | |
10 | |
9 | |
7 | |
6 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.