On Wed, Jun 04, 2003 at 04:44:44PM -0500, Jeffrey Horn wrote:
> Is it possible to use XInclude to include documents within either XSP
> documents or documents fetched into XSL sheets via <xsl:document> calls that
> are processed via AxKit?
>
> What I'm trying to do is break up components of a page into small parts each
> of which I can manage the ACL for seperately and have a single xsl sheet
> control how those parts are arranged within a whole, with the possibility
> that, based on the data from the XSP, some parts may or may not be included.
well, here's how I did it. It seems to work.
to graft an external XML snippit onto an element in x.xsp:
<?xml-stylesheet href="nst.xsl" type="text/xsl"?>
<xsp:page
xmlns:xsp="http://apache.org/xsp/core/v1"
xmlns:util="http://apache.org/xsp/util/v1"
xmlns:param="http://axkit.org/NS/xsp/param/v1"
xmlns:test="http://gormless.nowhere.org/edstrom/axkit/test/v1"
>
...
<thing>
...
<include href="literal.xml"/>
...
</thing>
...
in nst.xsl
<xsl:template match="include" >
<xsl:copy-of select="document(@href)"/>
</xsl:template>
literal.xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<test name="b"><test:report
xmlns:param="http://axkit.org/NS/xsp/param/v1"
xmlns:test="http://gormless.nowhere.org/edstrom/axkit/test/v1"
><test:frog><param:frog/></test:frog><test:box><param:box/></test:box></test:report></test>
the only two peculiarities that I've noticed ( so far ) are that
1) white space is not tolerated in the literal. I have no idea why.
Whitespace & indentation work OK with xsltproc, but won't work in
AxKit.
2) the NS aliases in the snippet do not need to be defined in the
literal.xml snippet, but they do have to make sense inside the
receiving element.
>
> Thanks!
>
> -- Jeff
--
John Edstrom
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]