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 (1182)
- Stylus Studio Technical Forum (14569)
-> + EDIFACT guideline from Stylus ... (3)
-> + CSV file putting all the data ... (5)
-> + Can't install Home version 64b... (5)
-> + presale - Can I covers this sc... (5)
-> + Problem with UNB (5)
-> + Splitting EDIFACT files pipeli... (4)
-> + Problem with SAXO processor - ... (5)
-> + PDF Format Help (4)
-> + License check unreliable (2)
-> - XML related issue (1)
-> + Need help regarding pipeline o... (2)
-> + Error converting XML to EDIFAC... (4)
-> + XSLT Profiling for XSLT 1.0 s... (2)
-> + Grouping (2)
-> + Best Practice for Pipeline err... (2)
-> + pdf generation (4)
-> + Problems excuting a Pipeline w... (2)
-> + XML serializer (3)
-> + Supported EDIFACT versions (5)
-> - Anyone know XActimate ESX file... (1)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (247)
+ XSLT Help and Discussion (7617)
+ XQuery Help and Discussion (1966)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Rick ScofieldSubject: XML Attribute Element output from XSLT
Author: Rick Scofield
Date: 31 Aug 2011 08:28 PM
I'm sure a very simple solution exists for for this...but it escapes me. I have a input file transformation that looks like this:
-root
--row
---season
---style
---color

my output file needs to look like this:
<Provision>
<Store code="XYZ">
<InventoryProductSettings_Update product_code="A02_BLK_OFA">
<TrackInventory>Yes</TrackInventory>
...more tags...etc
</InventoryProductSettings_Update>
</Store>
</Provision>

where the attribute element 'product_code' needs the value of 'style' from the input file. Not sure how to out the value of 'style' within the XML node/tag

The XSLT starts out like:
<xsl:for-each select="root/row">
<InventoryProductSettings_Update product_code= value="style">
<row>
...
</xsl:for-each>

Any help would be appreciated.
Rick

Posttop
Ivan PedruzziSubject: XML Attribute Element output from XSLT
Author: Ivan Pedruzzi
Date: 01 Sep 2011 03:06 PM

Using an attribute value temple

<InventoryProductSettings_Update product_code="{style}">

if style is an attribute use

<InventoryProductSettings_Update product_code="{@style}">


Have a look at the XSLT mapping tab it will help in these simple cases

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

   
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.