Subject:Bug Mapping To Substitution Group? Author:Luke Samaha Date:14 Dec 2005 12:02 PM
We have many trading partners about to go live exchanging business documents using a new XML schema that makes heavy use of extension types and substitution groups.
For example, a "RecordID" is a group that contains a "DocumentID" element, and a substitution group uses the "DocumentID" element to substitute a "PurchaseOrderNumber", "InvoiceNumber", etc. Our "PurchaseOrder" definition includes a reference to an "OrderHeader" group which utilizes the "PurchaseOrderNumber" substitution.
When using Stylus Studio 2006 XSLT Mapper, I add a third party XML format and begin the task of mapping to our order format, as our customers will no doubt need to do if we recommend Stylus as the recommended mapping tool.
Unfortunately, when I open the "OrderHeader" I see a "PurchaseOrderNumber" and an "InvoiceNumber" element. Dragging a mapping statement onto the (incorrect) "InvoiceNumber" node produces an illogical template match of OrderHeader.InvoiceNumber.
What's worse, the "PurchaseOrderNumber" and "InvoiceNumber" elements are present in other groups, including the "PaymentTerms".
Has anyone seen this type of behavior who can speculate on something we or the tool could do better?
Subject:Bug Mapping To Substitution Group? Author:Minollo I. Date:14 Dec 2005 12:56 PM
I'm not positive I follow your description. I do know that Stylus Studio will list all the "possible" child elements, without displaying which ones are in alternative; and that's something that might make the display of substitution groups confusing.
From what you are saying it would seem that Stylus Studio is behaving as expected, and that the schema itself is not specific enough to avoid "illogical" mappings.
That said, we would really need to take a look at the schema(s) to be sure we understand what you are seeing. Can you post it or email to email@example.com (or to me personally, if you prefer: firstname.lastname@example.org)?
Also, what Stylus Studio version and build number (Help > About) are you running?