[ I think, but I'm not sure]

When you use the document() function in xsl, you need to specify a url,
by not specifying a method in your testpage.xml arguement, you're effectively
getting a file uri.  aka document('file:testpage.xml?style=html')
I would expect that to fail having not found a file of that name, [ treating the query args, as part of the filename. ].

What you need to do is document('http://myserver.com/path/to/testpage.xml?style=meta')
and that should work, [ so try that first. ]

however, now you're annoyingly making http calls to the front end of your http server. This is where AxKit URIs come in, a URI of the form axkit:/testpage.xml?style=meta will get handled by AxKit, and make an apache subrequest to get that document for you,
inside the same request.

At least it's supposed to. However last I tried it with newer versions of AxKit,
libxml, and libxslt  it didn't actually work.   I have downgraded
libxml and libxslt to old versions, and haven't had time to figure out the issues.

This would be my favorite feature, because using axkit uri's allows you to construct complex pipelines of transformations, and put the caching at the points you want
it in those pipelines

--fess



On Aug 24, 2005, at 3:39 AM, [EMAIL PROTECTED] wrote:

I am trying to include a fragment of an XML document using the XSL
document() function. I need to be able to use a querystring in the URI in
order to select the appropriate style via the StyleChooser module.

I have the following code:

<xsl:copy-of select="document('testpage.xml?style=html')"/>
<xsl:copy-of select="document('testpage.xml?style=meta')"/>

However both requests ignore the querystring and the default style is
applied to each. If I access the documents directly in my browser, the
correct styles are applied so I know my StyleChooser stuff is set up
correctly. I did read reports of similar behaviour in the mailing list
archives but could not actually find details of how to overcome it.

I'm using AxKit 1.62

xsltproc --version
Using libxml 20619, libxslt 10114 and libexslt 812
xsltproc was compiled against libxml 20619, libxslt 10114 and libexslt 812
libxslt 812  was compiled against libxml 20619
libexslt 812 was compiled against libxml 20619


many thanks

--
Tom Kirkpatrick
Web Developer - Virus Bulletin

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to