xsl-list
[Top] [All Lists]

Re: How do I capture the text "around" a node?

2002-09-24 07:35:45

I'm reluctant to purchase a book as a reference as I understand that
somethings are not set in concrete yet.

XSLT 1 which is what you are using has been a recommendation (which is a
near to concrete as the w3c gets since 

There are some preliminary drafts of XSLT2 but they are still
preliminary and only supported in a cople of experimental
implementations. 

You shouldn't let the possibility of XSLT2 in teh future stop you
learning XSLT 1 which is very stable and widely implemented.

With the cost of books these days I find it hard to justify purchasing
them only to find that it hasn't answered my questions.

the faq at www.dpawson.co.uk will point you at free web resourses as
 well as books.

While apply-templates works as you said, the problem i have is that I
want to remove the chars (), hence I tried value-of

It wasn't at all clear from your posting quite what ( you were removing
as there were no () in your sample input.

Perhaps you want

<xsl:template match="book/text()[contains(.,'(')]">
<xsl:value-of select="translate(.,'()','')"/>
</xsl:template>


David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list