For me this works, you may want to check your URL:
[html]$ cat s1h.xsl
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:copy-of select="document('http://127.0.0.1/s1.xml')/here"/>
</xsl:template>
</xsl:stylesheet>
[html]$ xsltproc s1h.xsl some.xml
<?xml version="1.0"?>
<here>hello</here>
[html]$
And accessing that stylesheet from within a browser
(http://127.0.0.1/s2.xml) works too:
[html]$ cat s2.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="http://127.0.0.1/s1h.xsl"?>
<xml/>
[html]$
Mit besten Gruessen / Best wishes,
Hermann Stamm-Wilbrandt
Developer, XML Compiler, L3
WebSphere DataPower SOA Appliances
----------------------------------------------------------------------
IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294
Rob Belics
<rob_belics(_at_)chart
er.net> To
xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
01/27/2010 04:48 cc
AM
Subject
[xsl] Inserting XML into stylesheet
Please respond to using copy-of
xsl-list(_at_)lists(_dot_)mu
lberrytech.com
When I use a local file, I can insert an XML file into my xslt
stylesheet doing this:
<xsl:copy-of select="document('s1.xml')"/>
So I put s1.xml on my personal site:
<xsl:copy-of select="document('http://mysite.com/xml/s1.xml')"/>
but it fails with "XML Parsing Error: no element found"
s1.xml only contains <here>hello</here> and I can access it via a
browser. What am I doing wrong?
--~------------------------------------------------------------------
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>
--~--
--~------------------------------------------------------------------
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>
--~--