xsl-list
[Top] [All Lists]

[xsl] XPath Expression in XSL Template Will Not Return Document Element with Attributes‏

2009-02-09 17:04:26

Listmembers, I have a problem creating an appropriate XPath expression in a XSL 
file, and have been unable to find a solution. Here the Scenario: I have an xml 
file output from asp.net xmlserializer class. It outputs the Document Element 
"Catalog" with three attributes pertaining to XML namespaces.
 
the catalog tag looks like this (markup removed): 
 
Catalog
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
 
I have created an XSL file to restructure the information for use in a ASP.NET 
GridView Control.
 
  xsl:template match="/"
    xsl:apply-templates select="Catalog"
  xsl:template>
 
It works, but only if I remove the attributes from the Element. I need to know 
how to format the xsl:template match="Catalog" xpath expression in the XSL file 
to match that tag, even if it has attributes. 
 
This is my first post to this list. I hope this is a resource that will be 
helpful, and as I become more proficient in XPath and XSL, I'll be able to help 
others.
 
Thanks in advance.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>