On Thu, 22 Jun 2006 00:23:02 +0200,
vo*******@spatiallink.org
<vo*******@spatiallink.org> wrote:
I may not have to use xsl:copy-of. I may have to use xsl:variable.
Anyway, more failed attempts:
[1]
<xsl:template match="document('20060618.xml')/fruits">
<xsl:for-each select="fruit">
<xsl:value-of select="@name"/>
</xsl:for-each>
</xsl:template>
[2]
<xsl:template match="/">
<xsl:for-each select="document('20060618.xml')/fruits/fruit">
<xsl:value-of select="@name" />
</xsl:for-each>
</xsl:template>
Regards,
* Do you have any access at all to this '20060618.xml' document?
Run this to check it:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml"/>
<xsl:template match="/">
<xsl:copy-of select="document('20060618.xml')"/>
</xsl:template>
</xsl:stylesheet>
- Do you seen any output? Can you acces the 'fuit' elements? Is it just
the attribute that's bothering you?
- If not, try:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml"/>
<xsl:template match="/">
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>
- anything?
- is the name '20060618.xml' correct?
- Does it work when you include a full path name?
- maybe your xslt processor doesn't get permission to read he file? Maybe
it's a browser?
* Maybe the 20060618.xml document has a default namespace you didn't tell
us about?
- You'd have to include that namespace in the xslt
* What's <?xml-stylesheet type="text/xsl"
href="xsl_that_tries_to_copy_but_does_not_work.xsl "?> doing in
XML_TO_COPY.XML?
- If this is the source xml document with which the xslt does it magic,
why then use 'document()'?
- You speak of a merge, yet I only see one document.
Out of ideas:-)
regards,
--
Joris Gillis (
http://users.telenet.be/root-jg/me.html)
Gaudiam omnibus traderat W3C, nec vana fides