XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> - More flexible generated Java c... (1)
-> + Generic Schemas for representi... (2)
-> + Stylus Studio Professional rep... (2)
-> + XML XML Help (2)
-> + xsd help (2)
-> + XML data element friendly name... (2)
-> + HTML Tidy adapter is missing? (3)
-> + New Guy Here... (2)
-> + How to combine two similar fil... (2)
-> + Berkeley XML DB (4)
-> + What is the context node in th... (3)
-> + Multi element List (4)
-> + Cannot preview XSL transformat... (9)
-> + Why is this variable not showi... (7)
-> + Customising Schema Prefix (3)
-> + Please help!! XML AND XSL Tra... (6)
-> + XML to Excel in Home Edition (2)
-> + how to copy elements from an x... (2)
-> + Setting Saxon parameters in pi... (2)
-> + Trying to move SS license (3)
-> + Does SS PRO Support CSS (2)
-> + Selected values are not showin... (3)
-> + Copy Xpath To Clipboard Option... (2)
-> + Upgrading to SS 2006 3 - Activ... (3)
-> + XSL Efficiency tips (4)
-> - Report page Size and table hea... (1)
-> + Endless loop with xquery (8)
-> - Xpress XML (1)
-> + Extracting XML data into SQL s... (2)
-> + Crashes when I save (2)
-> + XSL cannot save: I/O error...b... (8)
-> + Diagram view has disappeared f... (5)
-> + Convert from http://www.w3.org... (2)
-> + Round-trip Converting; CSV-XML... (2)
-> + XSL error function call PHP (8)
-> + WYSIWYG XSLT Designer (5)
-> + generate xhtml+css from xml re... (2)
-> + generate xhtml+css from xml re... (3)
-> + generate xhtml+css from xml re... (2)
-> - Help using xsd xs:redefine nee... (1)
-> + Data loss opening External sch... (2)
-> + Install Apache FOP Plugin with... (8)
-> + Generating a Publisher Canvas ... (2)
-> + Stylus Studio comment block no... (3)
-> + Report Designer Screen Repaint... (5)
-> + validating on values (5)
-> + reuse of xslt (2)
-> + The evaluation period for the ... (2)
-> + export to documentation (3)
-> + Validating XML files using sev... (2)
-> + Missing 'Command' Tab in Custo... (3)
-> + Do I have to download new vers... (6)
-> + Can SS validate tags used in a... (5)
-> + validating schemas (2)
-> + Off-Topic Question - Looking f... (4)
-> + cannot see anything in mapper ... (2)
-> + Validating XSD schema sets (7)
-> + Standard Validation Engines (3)
-> + Style Sheet amendment to inclu... (2)
-> + Documentation - prevent import... (3)
-> + Debugging breakpoints with Sax... (17)
-> + Conversion (3)
-> + New and I am sure this is an e... (7)
-> + Saxon 8 with multiple xml inpu... (3)
-> + Compilation error (5)
-> + webservice call failing - pls ... (3)
-> + C# from Java Binding Classes (3)
-> + Java binding class generation (5)
-> + Validation of deeply-nested sc... (5)
-> + How to make Drag and drop in X... (2)
-> + Malformed XPATH expression par... (5)
-> + Toolbars and missing options (4)
-> + Converting Text File (2)
-> + Java Heap Issue (2)
-> + Formatting SOAP messages (6)
-> + Attribute Entity Expansion on ... (2)
-> + Text File to xml conversion wi... (9)
-> + Different XPath results when u... (7)
-> + Where is my XSLT mapper module (3)
-> + Where is my XSLT WYSIWYG Edito... (2)
-> + Regarding Stylus support of IA... (2)
-> + Debugging Problem with Enterpr... (5)
-> + various report designer prob;e... (12)
-> - will it EVER get fixed ?? Stru... (1)
-> - Migrate from wysiwyg xslt edit... (1)
-> + Entity Resolver in UI? (4)
-> + Visual Studio and Stylus Studi... (2)
-> + how to get rid of parameter in... (8)
-> + XQuery file (2)
-> + 505 error calling a WS from SS... (2)
-> + Configure Subversion with Styl... (2)
-> + XSLT Mapping of xsi:nil and xs... (2)
-> + Printing values in a table or ... (2)
-> + query on using stylus API for ... (12)
-> + WSDL retruns no response (2)
-> + SS XSL Processor Bug: Count() (6)
-> + Stylus Studio crashes after re... (2)
-> + Custom Converter in IBM JVM is... (10)
-> + Malformed XPATH epressions on ... (4)
-> - XML Report table borders when ... (1)
-- Previous [1501-1520] [1521-1540] [1541-1560] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Kevin SawyerSubject: Instructions In Mapper
Author: Kevin Sawyer
Date: 12 Mar 2007 11:51 AM
I am evaluating Stylus Studio for some of our XML Mapping tasks. Using the Mapper feature I can add an instruction (e.g., choose) and link it, but I cannot specify any of the tests or results. Double clicking does nothing. Right-clicking reveals Delete or Add When (for choose.) The version is an Evaluation Version of XML Enterprise Suite, Build 735f. Bug? Artifact of evaluation? Hard to evaluate without this.
Thanks,
Kevin

Postnext
(Deleted User) Subject: Instructions In Mapper
Author: (Deleted User)
Date: 13 Mar 2007 09:59 AM
Hi Kevin,
the xsl:choose instruction in Mapper has an equal number of ports on the left and right sides, one for every "xsl:when" sub-instruction, plus a special (square) port on the right side for the "xsl:otherwise".
You build the XSL code by dragging a node from the source tree to the input port on the left of the glyph; then you drag from the corresponding output port to one node of the target tree.

Hope this helps,
Alberto

Postnext
Kevin SawyerSubject: Instructions In Mapper
Author: Kevin Sawyer
Date: 15 Mar 2007 08:23 AM
Thanks Alberto,

Building the connections works OK. My main question is how do I enter the "when" criteria.

Kevin

Postnext
(Deleted User) Subject: Instructions In Mapper
Author: (Deleted User)
Date: 15 Mar 2007 08:43 AM
Kevin,
the "when" instruction is filled as soon as you drag something on the ports on the left.
As an example of a possible usage of xsl:choose, I created a new XSL stylesheet, switched to Mapper,
- selected books.xml as source and catalog.xml as target (from the examples\simpleMappings folder)
- dragged the "book" node to the "Book" node
- right clicked on the canvas, and chose XSLT Instructions | choose
- right clicked on the canvas, and chose XSLT Functions | count
- right clicked on the canvas, and chose Condition Tests | =
- dragged "author" to the left port of the "count()" block
- dragged the right port of the "count()" block into the top left port of the "=" block
- double clicked on the bottom left port of the "=" block and entered 1 in the dialog box
- dragged the right port of the "=" port into the left port of the "choose" block
- right clicked on the "Book" node in the target tree and selected Add Child Element, entering "SingleAuthor" as the node name
- dragged the top right port of the "choose" to the "SingleAuthor" node in the target tree
- dragged "author" from the source tree to "SingleAuthor" of the target tree

This generates

<xsl:choose>
<xsl:when test="count(authors/author) = 1">
<SingleAuthor>
<xsl:value-of select="authors/author"/>
</SingleAuthor>
</xsl:when>
<xsl:otherwise/>
</xsl:choose>

Then, I
- dragged from the square right port of the "choose" block to the "Authors" node of the target tree
- dragged "author" to "Author" twice (the first builds the for-each, the second copies the data)

This builds the xsl:otherwise part

<xsl:otherwise>
<Authors>
<xsl:for-each select="authors/author">
<Author>
<xsl:value-of select="."/>
</Author>
</xsl:for-each>
</Authors>
</xsl:otherwise>

Hope this helps,
Alberto


ImageMapper(1).JPG
Screenshot

Postnext
Kevin SawyerSubject: Instructions In Mapper
Author: Kevin Sawyer
Date: 15 Mar 2007 09:35 AM
Great. That clears things up for me.

On a related note, are there any other resources on using Stylus Studio for XML mapping? The product documentation is a little light so far.

Thanks again.

Kevin

Posttop
(Deleted User) Subject: Instructions In Mapper
Author: (Deleted User)
Date: 15 Mar 2007 12:44 PM
Hi Kevin,
there a few videos on the web site that show the Mapper interface; if you want to see step-by-step instructions you can have a look at http://www.stylusstudio.com/videos/xquery1/xquery1.html and http://www.stylusstudio.com/videos/xquery2/xquery2.html; they show the XQuery mapper interface (so they use XQuery instructions) but the same principles apply.

Hope this helps,
Alberto

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.