XSL: Spurious output using template match

ZewpeWSwero

New Member
I have an XSL stylesheet that I use to create xHTML fragments. The XML contains lots of information and I only want to transform one particular section, I match this like so (note this is my top level/first match):\[code\]<xsl:template match="root/SystemInfo/Errors">\[/code\]This works great, however, before my intended output I see \[code\]1001\[/code\] being written out. Upon further inspection this is the data of various tags that preceed my matched xpath \[code\]"root/SystemInfo/Errors"\[/code\]. What can I do to prevent this from happening?Example xml:\[code\]<?xml version="1.0"?><root> <Settings> <Enabled>1</Enabled> <Mode1>0</Mode1> <Mode2>0</Mode2> <Limit>1</Limit> </Settings> <SystemInfo> <Errors> <NOCONNECTION>1</NOCONNECTION> </Errors> </SystemInfo></root>\[/code\]XML Playground setup here to show the effect.
 
Back
Top