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)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Abhishek SalviSubject: Need Help In XSLT Mapping
Author: Abhishek Salvi
Date: 15 Oct 2008 03:26 AM
Hi All,

I have a scenario in which I need to perform the following mapping logic:

Source Structure:
<SrcMsg>
<Node1>
<Details>"<Name>XYZ</Name><Description>Desc1</Description><Id>ID123</Id>"</Details>
</Node1>
</SrcMsg>

Target Structure:

<TrgMsg>
<Node1>
<TargetID>ID123</TargetID>
</Node>
</TrgMsg>

i.e. I need to extract the data from Id tag within Details of Source message.
The Details node will have the following data as string:
<Name>XYZ</Name><Description>Desc1</Description><Id>ID123</Id>

How to perfrom this using XSLT Mapping.

Thanks,
Abhishek.

Postnext
(Deleted User) Subject: Need Help In XSLT Mapping
Author: (Deleted User)
Date: 21 Oct 2008 09:01 AM
Hi Abhishek,
if you have already loaded the source and target tree in XSLT Mapper with the XML/XSD you are going to use, you can just drag a link from Id to TargetID. Or were you asking a different question?

Alberto

Posttop
Ivan PedruzziSubject: Need Help In XSLT Mapping
Author: Ivan Pedruzzi
Date: 21 Oct 2008 04:03 PM

having double quotes around your tags does not make it a string but rather a mixed content.

Are you sure you have markup inside the element "Details" rathern the escape text that looks like this?

<SrcMsg>
<Node1>
<Details>"&lt;Name&gt;XYZ&lt;/Name&gt;&lt;Description&gt;Desc1&lt;/Description&gt;&lt;Id&gt;ID123&lt;/Id&gt;"</Details>
</Node1>
</SrcMsg>

If you have something like the above XSLT would not work for you


Hope this help
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.