![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - XPATH with >Thread Next - Re: XPATH with Re: XPATH with To: NULL Date: 7/1/2004 12:41:00 PM qluo wrote:
> In my XSL, I have the following line:
>
> <variable name="template_xml" select="document('template.xml')">
>
> When I try the following, nothing happens. Why?
>
> ------------------------------
> <xsl:for-each select="$template_xml/WORKBOOK/child::*">
> <xsl:copy-of select="."/>
> </xsl:for-each>
> -----------------------------
>
> But the following will work and it copies all in template.xml.
> ------------------------------
> <xsl:for-each select="$template_xml/child::*">
> <xsl:copy-of select="."/>
> </xsl:for-each>
> -----------------------------
>
> So, why can I not be able to refer to WORKBOOK or WORKSHEET?
Most likely WORKBOOK or WORKSHEET elements in template.xml are in some
namespace, while in XPath WORKBOOK means WORKBOOK element in no
namespace. Read about default namespace and XPath.
--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
