[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Substring a Value

Subject: Re: Substring a Value
From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx>
Date: Mon, 9 Aug 2004 22:09:22 +0100
xsl substring
Hi Trevor,

> In order to be able to use xslt functionality in the xsl file, can I
> just add an additional schema, and rebuild the link code using a
> reference to the additional schema? (I thought about this after
> surfing your site).

There's no way to use XSLT functionality in the WD-XSL stylesheet. (I
couldn't follow your suggestion; I think you're using the term
'schema' when you mean 'namespace', but I'm not sure.)

If you're doing a batch transformation (or you're doing the
transformation server-side and are happy hacking the script that
controls it, or you're happy doing a one-off change to your XML
documents) I suppose what you could do is take the XML input and put
it through a simple XSLT transformation to change the from attributes.
That would look like:

<xsl:stylesheet version="1.0"

<xsl:template match="@from">
  <xsl:attribute name="from">
      select="substring-before(substring-after(., 'ID('), ')')" />
<xsl:template match="node()|@*">
    <xsl:apply-templates select="@*|node()" />

Then you could run your existing WD-xsl stylesheet on the result.

Of course it's very possible that WD-xsl has a substring function; I
just don't know it. There must be some documentation for WD-xsl around
somewhere (and I think that there are some Microsoft-hosted mailing
lists), I just don't have a clue where they are.

My best advice is to update your WD-xsl stylesheet to XSLT. In the
long run, it will save you time and energy, not least because then
very many people on this excellent mailing list will be able to help
you with it.



Jeni Tennison

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.