Subject:References in Target schema in XSLT mapper Author:Emile Hermans Date:07 Feb 2006 07:12 AM
Hello,
I want to build an XSLT-mapping using the mapper. And the target schema is defined using an envelope (schema1) containing a reference to another xml-schema schema2.
However the target tree does only show the envelope (schema1) and not the structure of the referred structure.
Subject:References in Target schema in XSLT mapper Author:(Deleted User) Date:07 Feb 2006 10:43 AM
Hi, Emile. You should be able to see any structures from included (or imported) XML Schema (like your schema2) that are used by the referencing XML Schem (your schema1).
Subject:References in Target schema in XSLT mapper Author:Emile Hermans Date:13 Feb 2006 09:43 AM Originally Posted: 13 Feb 2006 09:37 AM
Hello,
I'm working on a customers PC and have to investigate if upgrading is feasible.
will come back on that.
Regards,
Emile
XTRA info:
I tested it on our companies version of stylus studio prof editon 2006 Build 501h -> same problem on this version
Subject:References in Target schema in XSLT mapper Author:Minollo I. Date:13 Feb 2006 09:54 AM
Yes, I have been able to see the same problem on BL501h too.
BTW, a "quick" workaround is to use an XML instance document consistent with that schema, instead of the schema itself; using Stylus Studio 2006 (that has improved that functionality) you can run the XML Schema to XML document wizard and generate a sample XML document for MainSchema.xsd; the full generation will create a largish XML document; you may want to accept the suggestion prompted by Stylus Studio to stop the generation after 5,000 elements.
Subject:References in Target schema in XSLT mapper Author:Minollo I. Date:13 Feb 2006 04:25 PM
Emile,
in the meanwhile we have been investigating the problem, and the issue seems to be related to the fact that Xerces C++, which is the underlying XML Schema interpreter Stylus Studio uses, doesn't "like" your XML Schema. In particular, it doesn't like:
<xsd:element ref="ZMATMAS2" xmlns=""/>
You can see that clicking the "Validate" button when MainSchema.xsd is open in Stylus Studio. If you change your "MainSchema.xsd" to avoid redefining the default namespace, and to avoid using xmlns="" when using ZMATMAS2, things will work fine:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="http://sap.com/xi/XI/SplitAndMerge"
xmlns:myNS="http://sap.com/xi/XI/SplitAndMerge"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<!--You can skip myNS declaration if you don't need to reference it in this document-->
<xsd:import schemaLocation="Schema1.xsd"/>
<xsd:element name="Messages">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Message1" form="qualified">
<xsd:complexType>
<xsd:sequence>
<xsd:element ref="ZMATMAS2"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
Subject:References in Target schema in XSLT mapper Author:Minollo I. Date:14 Feb 2006 08:51 AM
The crash you are seeing is caused by the fact that your schema uses very large "maxOccurrs" values; that triggers a know issue in the Xerces C++ validation engine.
In Stylus Studio 2006 we have workarounded that issue by treating large maxOccurrs values as "unbounded"; you won't get any crash using Stylus Studio 2006.