Subject:For-each not generated automatically Author:Neal Walters Date:10 Mar 2005 09:48 AM
I'm dragging an XML element from a node that occurs multiple times
to another node that occurs multiples times. According to the
doc, "Blocks can be created - automatically when you link one
node to another... If you link repeating elements in the source
and target documents, Stylus Studio automatically creates an
xsl:for-each instruction block in the mapper".
from .pdf file page 418.
Below are relevant schema fragments from my source first then target
second. I used the GUI mapper and mapped IT_QUANTITY to ItemQty and no
for-each block was created. If I manually add the for-each block,
everything works okay. So my question is if I did something wrong
that the for-each block was not added automatically?
Subject:Re: For-each not generated automatically Author:Minollo I. Date:10 Mar 2005 09:59 AM
This is a limitation of the current version: repeating elements described
by XML Schema or DTD are not properly recognized; only those described by
an instance document are.
You can, of course, still manually create the "for-each" block and force
the repetition to be taken into account.
Subject:For-each not generated automatically Author:Neal Walters Date:10 Mar 2005 10:11 AM
As I continue reading your manual, I found the following.
The element "ITEM" does not have the icon that identifies it as
a "repeating element", rather it has the normal "element" icon.
So if XSLT does not see this as a repeating item, that would explain
why it didn't create the for-each, so now the question is "Why
doesn't Stylus Studio recognize this element as a repeating element?"
Subject:For-each not generated automatically Author:Neal Walters Date:10 Mar 2005 10:14 AM
Sorry, I was posting about the same time you were,
so I didn't read your last message when I posted my last message.
Seems like this is a bug that needs to be fixed.
Subject:Re: For-each not generated automatically Author:Minollo I. Date:10 Mar 2005 10:18 AM
I think I answered this question in my previous post.
BTW, another way to control the kind of link created is to drag&drop the
connection line using the right button of the mouse; a popup menu will let
you choose the kind of link that better describes the operation you are
trying to accomplish.
Subject:For-each not generated automatically Author:Neal Walters Date:10 Mar 2005 10:59 AM
From the mapper I add a "xslt:choose" instruction block.
When I right-click it, I have three shortcut menu options:
1) Delete, 2) Go to source, and 3) Add When Port.
Page 439 of the .pdf doc talks about right-clicking it and selecting
the "properties" option. I don't see the properties option.
Am I doing something wrong. (Using build 287h.)