![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Re: XPATH with >Thread Next - Re: XPATH with Re: XPATH with To: NULL Date: 7/1/2004 8:59:00 AM I Think you are right. How can I address the issue then?
The beginning of the template.xml is:
-------------------------------
<?mso-application progid="Excel.Sheet"?>
<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:x="urn:schemas-microsoft-com:office:excel"
xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
xmlns:html="http://www.w3.org/TR/REC-html40">
---------------------------------
Again, how can I make the following work?
------------------------------
<xsl:for-each select="$template_xml/Workbook/child::*">
<xsl:copy-of select="."/>
</xsl:for-each>
-----------------------------
THANKS A MILLION!!!
Oleg Tkachenko [MVP] wrote:
> 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.
>
| ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
