leonaapple
New Member
If I have an xml with namespaces and want to apply some values replacement, what do I have to change?http://xslt.online-toolz.com/tools/xslt-transformation.php\[code\]<?xml version="1.0"?><accounts><account><name>Alex</name></account><account><name>Fiona</name></account></accounts>\[/code\]This will change alle name values to "Johndoe":\[code\]<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="node() | @*"> <xsl:copy> <xsl:apply-templates select="node() | @*"/> </xsl:copy> </xsl:template> <xsl:template match="account/name/text()"> <xsl:text>JohnDoe</xsl:text> </xsl:template></xsl:stylesheet>\[/code\]But what if I have a namespace before very tag, like:\[code\]<?xml version="1.0"?><my:accounts><my:account><my:name>Alex</my:name></my:account><my:account><my:name>Fiona</my:name></my:account></my:accounts>\[/code\]