Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
XSLT Help and Discussion
»
Mapping Question. Please Help
Conferences
Stylus Studio Feature Requests
(1192)
Stylus Studio Technical Forum
(14621)
Website Feedback
(249)
XSLT Help and Discussion
(7625)
Sum Groups into a subtotal an...
(4)
Finding an alternative to disa...
(3)
Counting unique values of an a...
(3)
XSLT not acceptable
(2)
Use of XSL file
(8)
Mapping Question. Please Help
(2)
Mapping Question. Please ...
XSL - FO Page count
(3)
xml tree to flat xml
(3)
xsl:element - qname
(3)
XSLT and multiple children
(2)
To find totalamount
(5)
Comparing Strings - Using cont...
(1)
AUtomatic conversion XML to XM...
(2)
recursion of wurfl document - ...
(4)
Traversing XML Tree - Want to ...
(4)
Instead of repeating code, can...
(3)
XSL - Display Variable From UR...
(4)
Show/Hide SPAN tag
(2)
Help a newbie
(5)
convert attribute to element
(2)
Learning XML/XSLT
(2)
Previous
[1261-1280]
[1281-1300]
[1301-1320]
Next
XQuery Help and Discussion
(2017)
Stylus Studio FAQs
(159)
Stylus Studio Code Samples & Utilities
(364)
Stylus Studio Announcements
(113)
Topic
next
Subject:
Mapping Question. Please Help
Author:
gary zlatkin
Date:
14 Nov 2006 12:52 PM
How can I map the following source
<?xml version="1.0" encoding="utf-8"?>
<Envelope>
<SubmissionReason>AdditionalLocation</SubmissionReason>
<SubmissionReason>Tooling</SubmissionReason>
<SubmissionReason>ChangeSource</SubmissionReason>
</Envelope>
to the following target?
<?xml version="1.0"?>
<ITEM>
<LOCATION_SUBMISSION>XXXXXXXXXX</LOCATION_SUBMISSION>
<TOOLING_SUBMISSION>XXXXXXXXXX</TOOLING_SUBMISSION>
<CHANGE_SUBMISSION>XXXXXXXXXX</CHANGE_SUBMISSION>
</ITEM>
Thx, Z
top
Subject:
Mapping Question. Please Help
Author:
Tony Lavinio
Date:
14 Nov 2006 02:58 PM
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="
http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<ITEM>
<xsl:apply-templates select="Envelope/SubmissionReason"/>
</ITEM>
</xsl:template>
<xsl:template match="SubmissionReason">
<xsl:choose>
<xsl:when test=". = 'AdditionalLocation'">
<LOCATION_SUBMISSION>XXXXXXXXXX</LOCATION_SUBMISSION>
</xsl:when>
<xsl:when test=". = 'Tooling'">
<TOOLING_SUBMISSION>XXXXXXXXXX</TOOLING_SUBMISSION>
</xsl:when>
<xsl:when test=". = 'ChangeSource'">
<CHANGE_SUBMISSION>XXXXXXXXXX</CHANGE_SUBMISSION>
</xsl:when>
</xsl:choose>
</xsl:template>
</xsl:stylesheet>
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 to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
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.