Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


[xsl] Replace an attribute

From: <seantiley@----------->
To:
Date: 1/4/2008 2:50:00 AM
Hi there,
I am new to xslt but I have an xml file in the following format
<root>
   <file name=3D"c:\blah\blah\class.java">
       <error line=3D"1" message=3D"Parameter status should be final"/>
   </file>
</root>

I would like to be able to replace the name attribute of the file =
element in the original file and leave the rest of the file intact, then =
pass the results to a different stylesheet.

The first step is simply replacing the attribute



I had a look at the replace function and tried something like this
<xsl:value-of select=3D'replace(@name,"c:\blah\blah\*","files")'/>

Unfortunately that seemed to have no effect at all.



I must be missing something painfully obvious



Any advice or suggestions are welcomed, perhaps another function should =
be used but replace sure seems right

Thanks
Sean


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent