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)
-> + Mapping complex document with ... (8)
-> + Sorting in XSLT (2)
-> + xsl date time adding... (16)
-> - Flat XML to nested XML convers... (1)
-> + parser for parsing XSL file (2)
-> - q on group function (1)
-> + compare 2 date value using xsl (2)
-> - Remove namespaces from SOAP pa... (1)
-> + Numeric string not displaying ... (3)
-> + where is the old HTM to XSL wi... (2)
-> - XSLT variable path (2)
-> ->XSLT variable path
-> + Sort by lookup values & styles... (2)
-> + Hi without hard code filed na... (2)
-> + XSLT output does not work (2)
-> + How can I do this javascript i... (2)
-> + Paging with XSL and passing UR... (2)
-> + XPath Condition Query (3)
-> + Xalan Multiple XML Output Over... (3)
-> + Inserting Line Break (2)
-> + Get Value from non-standard xm... (2)
-- Previous [541-560] [561-580] [581-600] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Srinath AcharSubject: XSLT variable path
Author: Srinath Achar
Date: 29 Sep 2008 01:01 PM
Hello Friends,

There is a file which contains

<Message type="INVOIC" version="D" release="96A" agency="UN" guideline="ELEB01" id="D:\Asiakkaat\UPM_CE\Release\0067E10A.TIF">
</Message>

I need to code the XSLT mapping in such a way that I should get the output as below (to one segment <TDOBNAME>)

<TDOBNAME>0067E10A.TIF</TDOBNAME>

Please note that the length of " D:\Asiakkaat\UPM_CE\Release\" is a variable length.Hence we can not use the substring((Message/@id) 29,12).
Please suggest the code.

Thanks in advance for your time.

Posttop
(Deleted User) Subject: XSLT variable path
Author: (Deleted User)
Date: 01 Oct 2008 03:28 PM
You need to write a template where substring-after is used to recursively extract the substrings starting with '\' until it returns an empty string.

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.