You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Stephan Michels <st...@vern.chem.tu-berlin.de> on 2001/11/23 13:43:54 UTC

XInclude

Hi,
I have some problems using the xinclude transformer. I produce
the xinclude elements by a xslt.

sitemap.xmap:
[...]
<map:transform src="stylesheets/vs/th-importer.xsl"/>
<map:transform type="newxinclude"/>
[...]

th-importer.xsl:
[...]
<xsl:template match="media">
<media>
 <xi:include>
  <xsl:attribute name="href">/home/stephan/Projekte/FIZ/VSC01<xsl:value-of
                 select="@ref"/>.third</xsl:attribute>
  </xi:include>
 <xsl:apply-templates select="*|text()|processing-instruction()"/>
</media>
</xsl:template>
[...]

output:
<media xmlns:xi="http://www.w3.org/2001/XInclude">
 <xi:include
href="/home/stephan/Projekte/FIZ/VSC01/ch/1/pc/xmltest/vscml/music.third"/>
 <parameter name="bla" value="blah"/>
</media>

I debug the code and found that:
XIncludeTransformer.java:196:
getLogger().debug("Base URI: " + current_xmlbase_uri.getSystemId());
produce a nullpointer exception, because current_xmlbase_uri is not set.

Must I set an base attribute? The working draft from w3 doesn't contain
this attribute.
Is this a known problem?

Thank you, Stephan Michels.


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: XInclude

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
At 1:43 pm +0100 23/11/01, Stephan Michels wrote:
>Hi,
>I have some problems using the xinclude transformer. I produce
>the xinclude elements by a xslt.

[snip]

>Must I set an base attribute?

	CInclude does not require it but XInclude does I believe.

	Something like this should work for XInclude:

		<xi:include xml:base="context://path/to/" href="file" parse="xml"/>

	Or this for CInclude:

		<ci:include src="context://path/to/file"/>

>The working draft from w3 doesn't contain
>this attribute.
>Is this a known problem?

It is unlikely that the current implementation matches the current
specification, I understand it has been in flux for some time.


Hope this helps


regards Jeremy


-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <ma...@mac.com>     		 <http://www.media.demon.co.uk>
   <phone:+44.[0].20.7737.6831>             <pa...@vizzavi.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org