You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Ed Wolpert <wo...@radiancegroup.com> on 2000/01/24 22:53:36 UTC

xsl:include doesn't seem to work...

Folks-
  I'm using xalan 0.19.2 inside of Cocoon 1.6. It looks like the xsl:include
isn't working. I've gotten the examples to work in one xsl file. When I
split
it up, regardless of how the href is structured, it doesn't apply the second
xsl file to the original. Note that it does find the file... for if I put in
a
slightly wrong URL, it fails altogether. Also, when I tried to go to the URL
listed, it gave the proper xsl file.  Ideas?  (I checked the mailing list
first,
and this was asked originally, back in November, but it was never answered.)

Thanks.

	<xsl:include href="http://localhost/template/page.xsl"/>


Edward Wolpert
Radiance Group 

Re: xsl:include doesn't seem to work...

Posted by Eric SCHAEFFER <es...@posterconseil.com>.
Fix from Scott (in Cocoon) :
 ----
Here is the patch I think you need to make to the XalanTransformer parser
liaison:

class XMLParser extends XMLParserLiaisonDefault
{
Parser parser;
Document document;

public XMLParser(Parser parser)
{
this.parser = parser;
}

public Document createDocument()
{
return this.parser.createEmptyDocument();
}

public void parse(InputSource in) throws IOException, SAXException
{
this.document = this.parser.parse(in);

// The Xalan stylesheet is normally built from SAX events,
// so if a DocumentHandler is specified, we need to produce
// SAX events from the DOM tree.
if(null != m_docHandler)
{
org.apache.xalan.xpath.xml.TreeWalker tw
           = new org.apache.xalan.xpath.xml.TreeWalker(m_docHandler);
tw.traverse(this.document);

// Note that when cocoon transitions to being more SAX based,
// this function will be called recursivly while the parser is
// still in the middle of a parse, and thus the parser will have
// created on the fly (or perhaps cloned) since the Xerces parser
// is not (to my knowledge) reentrant.
}
}

public Document getDocument()
{
return this.document;
}

public boolean getShouldExpandEntityRefs()
{
return true;
}

public boolean supportsSAX()
{
return true;
}
}

-scott






_______________________________________

Eric SCHAEFFER
eschaeffer@posterconseil.com

POSTER CONSEIL
118 rue de Tocqueville
75017 PARIS
FRANCE
Tel. : 33-140541058
Fax : 33-140541059

----------------------------------------------------------------------------
-----------------------------
 Come to the first official Apache Software Foundation Conference!
-----------------------------------
http://ApacheCon.Com ------------------------------------
_______________________________________

----- Original Message -----
From: Ed Wolpert <wo...@radiancegroup.com>
To: <xa...@xml.apache.org>
Sent: Monday, January 24, 2000 10:53 PM
Subject: xsl:include doesn't seem to work...


> Folks-
>   I'm using xalan 0.19.2 inside of Cocoon 1.6. It looks like the
xsl:include
> isn't working. I've gotten the examples to work in one xsl file. When I
> split
> it up, regardless of how the href is structured, it doesn't apply the
second
> xsl file to the original. Note that it does find the file... for if I put
in
> a
> slightly wrong URL, it fails altogether. Also, when I tried to go to the
URL
> listed, it gave the proper xsl file.  Ideas?  (I checked the mailing list
> first,
> and this was asked originally, back in November, but it was never
answered.)
>
> Thanks.
>
> <xsl:include href="http://localhost/template/page.xsl"/>
>
>
> Edward Wolpert
> Radiance Group
>


Re: xsl:include doesn't seem to work...

Posted by Stefano Mazzocchi <st...@apache.org>.
Ed Wolpert wrote:
> 
> Folks-
>   I'm using xalan 0.19.2 inside of Cocoon 1.6. It looks like the xsl:include
> isn't working. I've gotten the examples to work in one xsl file. When I
> split
> it up, regardless of how the href is structured, it doesn't apply the second
> xsl file to the original. Note that it does find the file... for if I put in
> a
> slightly wrong URL, it fails altogether. Also, when I tried to go to the URL
> listed, it gave the proper xsl file.  Ideas?  (I checked the mailing list
> first,
> and this was asked originally, back in November, but it was never answered.)

This has been fixed by Scott in 1.6.1-dev that will be out very soon.
(or you can grab the CVS module if you want)

Stay tuned on the cocoon mail list for the announement.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------