You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by "Bröckelmann, Mathias" <MB...@ubis-ag.com> on 2002/04/26 12:57:24 UTC
xmldb protocol in xsl stylesheets is not working
Hi,
I´m faced with a strange problem on using the xmldb protocol.
It is working perfektly when I use it in the sitemap as a source for the FileGenerator.
But it is not working in an stylesheet to pull a document out of a xmldb (Xindice) Database.
Stylesheet:
<xsl:stylesheet ...>
...
<xsl:template match="foo">
...
<xsl:copy-of select="document('xmldb:xindice:///db/test/news/documentkey')"/>
...
</xsl:template
...
</xsl:stylesheet>
This is perfektly working if I use an other source that xmldb:...
The XML document is well formed and valid in the database.
The stacktrace i got is really long so i won´t post it at all but an excerpt:
>>>snip>>>
org.apache.avalon.framework.component.ComponentException: UnnamedSelector: ComponentSelector could not find the component for hint: xml
at org.apache.avalon.excalibur.component.ExcaliburComponentSelector.select(ExcaliburComponentSelector.java:270)
at org.apache.cocoon.sitemap.DefaultSitemapComponentSelector.select(DefaultSitemapComponentSelector.java:109)
at org.apache.cocoon.components.source.AbstractSAXSource.getInputStream(AbstractSAXSource.java:125)
at org.apache.cocoon.components.source.AbstractSAXSource.getInputSource(AbstractSAXSource.java:151)
at org.apache.cocoon.components.xslt.XSLTProcessorImpl.resolve(XSLTProcessorImpl.java:459)
at org.apache.xpath.SourceTreeManager.resolveURI(SourceTreeManager.java:184)
at org.apache.xalan.templates.FuncDocument.getDoc(FuncDocument.java:278)
at org.apache.xalan.templates.FuncDocument.execute(FuncDocument.java:235)
at org.apache.xpath.XPath.execute(XPath.java:318)
at org.apache.xalan.templates.ElemVariable.getValue(ElemVariable.java:311)
at org.apache.xalan.templates.ElemVariable.execute(ElemVariable.java:282)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:422)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:226)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2243)
at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:710)
at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:422)
at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:226)
at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2243)
at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2069)
at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1171)
<<<snap<<<
I´m using cocoon 2.1 but this problem exists also in the latest stable release.
Thank you,
Mathias Broekelmann
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org
Re: xmldb protocol in xsl stylesheets is not working
Posted by Michael Hartle <mh...@hartle-klug.com>.
Bröckelmann, Mathias wrote:
><xsl:stylesheet ...>
> ...
> <xsl:template match="foo">
> ...
> <xsl:copy-of select="document('xmldb:xindice:///db/test/news/documentkey')"/>
> ...
> </xsl:template
> ...
></xsl:stylesheet>
>
Just a note: IIRC, using document() in an XSL stylesheet probably will
result in caching problems, as the TraxTransformer only checks the
modification date of the XSL file, but not the document()-wise
referenced XML sources.
Just guessing, might it be that the URL in document() isn't being
resolved with a SourceResolver ?
>I´m using cocoon 2.1 but this problem exists also in the latest stable release.
>
>Thank you,
>
>Mathias Broekelmann
>
>
Best regards,
Michael Hartle,
Hartle & Klug GbR
---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org