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

Re: Find and change an attribute in a Processing Inst

Subject: Re: Find and change an attribute in a Processing Instruction
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 31 Jan 2006 12:36:28 GMT
r attrib change
> > <xsl:processing-instruction name="name()">

>   I'd use 'xsl:copy'.

No, that wouldn't work here. Like attributes and comments, processing
instructions don't have child nodes. The "text" of the processing
instruction is the value of the node itself, not the value of a child
text node as it would be with an element.

So if you use xsl;copy you copy the whole node, including its value, and
can not change the text inside.

By using <xsl:processing-instruction name="{name()}"> you generate a PI
with the same name as before but you are then free to apply string
replace templates to modify the PI text.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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.