RE: [xsl] Generic Element to Attribute String Conversion

Subject: RE: [xsl] Generic Element to Attribute String Conversion
From: "Touchtel" <omprakashv@xxxxxxxxxxxxxxxxx>
Date: Sat, 5 Feb 2005 10:51:17 +0530
         An example of a recursive string chopping template is available

	Good luck.

-----Original Message-----
From: Wendell Piez [mailto:wapiez@xxxxxxxxxxxxxxxx]
Sent: Saturday, February 05, 2005 1:14 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Generic Element to Attribute String Conversion


At 02:40 PM 2/4/2005, you wrote:
>>Your question has a simple answer, but it also contains a possible
>>"gotcha" that is potentially very important.
>I think I know what you're talking about and I think this software
>includes an extension function I can use to access nodes by path even if
>it isn't allowed by XSL.

Yes, Saxon has a saxon:evaluate() extension for this (given an arbitrary
string, evaluate as XPath), and other processors may have their own

>>and then spliced together, this is most easily achieved by a recursive
>>string-chopping template (or possibly by string-replacement functionality
>>in XSLT 2.0).
>I can't use XSL 2 yet.  I will search for recursive string-chopping; my
>last search didn't find that.

Try recursive templates, string replacement: "string-chopping" is just the
way I described it (though you might get lucky).

The FAQ has a section on "General String Replace": see


Wendell Piez                            mailto:wapiez@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.      
17 West Jefferson Street                    Direct Phone: 301/315-9635
Suite 207                                          Phone: 301/315-9631
Rockville, MD  20850                                 Fax: 301/315-8285
   Mulberry Technologies: A Consultancy Specializing in SGML and XML

Current Thread