[Yanel-dev] URI resoving patch for BasicXMLResource

Josias Thöny josias.thoeny at wyona.com
Thu Mar 6 14:08:44 CET 2008


Evaldas Taroza wrote:
> This solves the problem, that with BasicXMLResource the
> <xsl:include href="yanelrepo:/xslt/my.xsl">
> Did not work.

I applied your patch, thank you very much.
Finally we are able to re-use xslt code.

josias

> 
> Evaldas
> 
> 
> ------------------------------------------------------------------------
> 
> Index: impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java
> ===================================================================
> --- impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java	(revision 32696)
> +++ impl/java/org/wyona/yanel/impl/resources/BasicXMLResource.java	(working copy)
> @@ -235,14 +235,16 @@
>              xmlReader.setEntityResolver(catalogResolver);
>              xmlReader.setFeature("http://xml.org/sax/features/namespace-prefixes", true);
>  
> +            SourceResolver uriResolver = new SourceResolver(this);
> +            
>              // create xslt transformer:
>              SAXTransformerFactory tf = (SAXTransformerFactory)TransformerFactory.newInstance();
> +            tf.setURIResolver(uriResolver);
>  
>              String[] xsltPaths = viewDescriptor.getXSLTPaths();
>              if (xsltPaths == null || xsltPaths.length == 0) {
>                  xsltPaths = getXSLTPath(getPath());
>              }
> -            SourceResolver uriResolver = new SourceResolver(this);
>              
>              TransformerHandler[] xsltHandlers = new TransformerHandler[xsltPaths.length];
>              for (int i = 0; i < xsltPaths.length; i++) {
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Yanel-development mailing list
> Yanel-development at wyona.com
> http://lists.wyona.org/cgi-bin/mailman/listinfo/yanel-development


-- 
Josias Thöny
Wyona - Open Source Content Management
http://www.wyona.com


More information about the Yanel-development mailing list