Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Help! How Import XML Using xsl:copy-of & document()? >Thread Next - Re: Help! How Import XML Using xsl:copy-of & document()? Re: Help! How Import XML Using xsl:copy-of & document()?To: NULL Date: 2/2/2006 9:07:00 AM <pmbarnes@g...> wrote in message
news:1138855015.046838.154100@g......
>I am pretty new to XSL. I'm trying to import the contents of a
> well-formed XML document into an XSL file during processing. Everything
> I've read on this says that the following should work:
>
> <xsl:copy-of select="document('header.xml')"/>
>
> But nothing happens. The Row elements in header.xml never get imported.
> I don't get any processing errors. I've also tried in the select
> attribute appending "/node()" and "/Header/node()" and a few other
> things.
>
> Here's the contents of header.xml:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Header xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet"
> xmlns:x="urn:schemas-microsoft-com:office:excel">
> <Row>
> <Cell ss:StyleID="s85"><Data ss:Type="String">Changes are not
> pushed back to InfoPath! </Data></Cell>
> <Cell ss:StyleID="s84"/>
> <Cell ss:StyleID="s84"/>
> </Row>
> <Row ss:AutoFitHeight="0" ss:Height="35.25">
> <Cell ss:StyleID="s48"><ss:Data ss:Type="String"
> xmlns="http://www.w3.org/TR/REC-html40"><B>CMS</B><Font> ::
> Hardware Quote</Font></ss:Data></Cell>
> </Row>
> </Header>
>
Try a simple stylesheet with just
<xsl:template match="/">
<<xsl:copy-of select="document('header.xml')"/>
</xsl:template>
This assumes that both header.xml and the stylesheet are loaded from files
in the same folder.
The other thing is which platform are you using?
If you're using .NET or the later Msxml versions then you'll need to set
permisssions to allow use of the document function
--
Joe Fawcett (MVP - XML)
https://mvp.support.microsoft.com/profile=8AA9D5F5-E1C2-44C7-BCE8-8741D22D17A5
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
