|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Getting the value of an attribute
I suspect this may be a very silly question. If so, my apologies. If I have this source document (fragment): ?xml version="1.0" encoding="UTF-8"?> <error> <body> <timestamp>11/26/2007 5:43:41 PM</timestamp> <message>HandlingInstanceID: 3385d1e7-6173-44b8-93a6-ba82bdf462ad <Exception> ... <additionalInfo> <info name="MachineName" value="Test"/> <info name="TimeStamp" value="11/26/20007 5:43:41 PM"/> <info name="FullName" value="Microsoft.Practices.EnterpriseLibrary.ExceptionHandling, Version=2.0.0.0, Culture=neutral, PublicKeyToken=null"/> <info name="AppDomainName" value="/LM/W3SVC/165639889/Root-1-128115363895000000"/> <info name="ThreadIdentity" value=""/> <info name="WindowsIdentity" value="NT AUTHORITY\NETWORK SERVICE"/> </additionalInfo> </Exception> </message> ... </body> </error> Why does this stylesheet (fragment): <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> ... <xsl:template match="body/message"> <Msg> <Error> <xsl:attribute name="appDomainName"> <xsl:value-of select="Exception/additionalInfo/info[@name='AppDomainName']/@name"/> </xsl:attribute> ... </Error> </Msg> </xsl:template> </xsl:stylesheet> not give me the value of the AppDomainName attribute in the appDomainName attribute of <Error> below: <Msg> <Error appDomainName="AppDomainName "/> </Msg> ... I have the feeling that this should be obvious to me, but it has been a busy day, so if anyone would be kind enough to put me out of my misery, I would be eternally grateful. Thanks Peter
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






