You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Joerg Heinicke <jo...@gmx.de> on 2004/07/01 00:28:48 UTC
Re: Cocoon 2.1.5 incompatibilities with TEI Stylesheets
On 29.06.2004 17:18, Nick wrote:
> <>I am trying to transform a TEI document into HTML and PDF documents
> using "native" XSL style sheets from
> http://www.tei-c.org/Stylesheets/teixsl.html <http://www.tei-c.org/>.
> These style sheets are composed of one main (teihtml.xsl) that uses
> <xsl:include> and <xsl:import> and a whole bunch of other XSL modules
> that handle all possible TEI tags.<>
>
> <>Those style sheets work perfectly fine with a regular browser. At the
> point when I try to use the main style sheet within a pipeline all sorts
> of troubles occur. Originally, the XSLT transformer would generate empty
> output (without producing any errors). After I changed all the
> xsl:include and xsl:import statements in teihtml.xsl to use cocoon
> protocol (with href parameter)
No need for this.
> the pipeline produced some kind of the
> result, namely <>XML file that is produced by the generator. This output
> contains no XML tags, some XSL tags that should not be there and without
> any HTML tags.<>
Sounds like anything does not match but is handled by built-in templates
that just output text.
> <>Can somebody help me with solving this problem or share the
> information about how to integrate existing TEI style sheets to be used
> with Cocoon 2.1.5?
For a specfic use case I had even the DocBook stylesheets running in
Cocoon, so I guess it's not a problem of TEI and not of Cocoon in
general. But you might have a look at the endorsed libs problem.
Furthermore it would be interesting to know the xslt processor you use.
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon 2.1.5 incompatibilities with TEI Stylesheets
Posted by Joerg Heinicke <jo...@gmx.de>.
On 02.07.2004 17:02, Nick wrote:
>> Sounds like anything does not match but is handled by built-in
>> templates that just output text.
> Believe it or not, but the very same example worked just fine with
> cocoon 2.0.5 (originally I used Cocoon 2.1.4). Is there any was to
> figure out what those built in templates do and to disable them?
Don't know about the difference between 2.0.5 and 2.1.4, most probably
the Xalan version. But the newer Xalan (in 2.1.4) should be much more
stable and standard conform.
About built-in templates: This has nothing to do with Cocoon but with
the XSLT processor, here Xalan. Of course you can not disable them, they
are part of the spec: http://www.w3.org/TR/xslt#built-in-rule. You have
to live with them, but every hand-added template overwrites the
particular rules.
> The XSLT processor I use is Xalan (sorry I can't figure out what the
> version is) that comes with Cocoon 2.1.5. When I tried switching to
> Saxon - that's the output is the same.
What's your input of the TEI XSLT processing? Can you provide a test case?
Joerg
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org
Re: Cocoon 2.1.5 incompatibilities with TEI Stylesheets
Posted by Nick <go...@muss.cis.mcmaster.ca>.
Dear Joerg Heinicke,
Thank you very much for your reply.
>> <>I am trying to transform a TEI document into HTML and PDF documents
>> using "native" XSL style sheets from
>> http://www.tei-c.org/Stylesheets/teixsl.html <http://www.tei-c.org/>.
>> These style sheets are composed of one main (teihtml.xsl) that uses
>> <xsl:include> and <xsl:import> and a whole bunch of other XSL modules
>> that handle all possible TEI tags.<>
>>
>> <>Those style sheets work perfectly fine with a regular browser. At
>> the point when I try to use the main style sheet within a pipeline
>> all sorts of troubles occur. Originally, the XSLT transformer would
>> generate empty output (without producing any errors). After I changed
>> all the xsl:include and xsl:import statements in teihtml.xsl to use
>> cocoon protocol (with href parameter)
>
>
> No need for this
In case if I leave the teihtml.xsl style sheet intact, the output that I
receive is the following:
<?xml version="1.0" encoding="ISO-8859-1"?>
<em xmlns:tei="http://www.tei-c.org/ns/1.0"/>
The pipeline is unchanged and there are no other changes then modifying
path to the style sheet to use cocoon protocol
>> the pipeline produced some kind of the result, namely <>XML file that
>> is produced by the generator. This output contains no XML tags, some
>> XSL tags that should not be there and without any HTML tags.<>
>
>
> Sounds like anything does not match but is handled by built-in
> templates that just output text.
>
That is definitely an option. I had a similar problem when I was trying
to produce HTML tags and apply an XSL style sheet that matches on some
of those HTML tags and inserts new ones (one of the use cases might be
capturing a web page, getting, say, main table via html/body/table path
and adding it into a new page which would display a custom header).
Normally it would not provide me with the output that is required (fully
formatted HTML page), but rather with partial stripped down XML (some of
the textual content of the page) that was produced by the generator
without any XML, XSL or HTML tags.
I observed this kind of behavior when trying to go through the "fiery"
example form Carsten Ziegeler's book "Cocoon:building XML Applications"
that is located on page 95, chapter 4 Putting Cocoon to Work. In that
case page was generated successfully, but the transformation give never
worked. Later on I fixed this example by using <xsl:copy-of select...>
instead of <xsl:value-of select...>. But in that case it was an
extremely simple XSL.
Believe it or not, but the very same example worked just fine with
cocoon 2.0.5 (originally I used Cocoon 2.1.4). Is there any was to
figure out what those built in templates do and to disable them?
>> <>Can somebody help me with solving this problem or share the
>> information about how to integrate existing TEI style sheets to be
>> used with Cocoon 2.1.5?
>
>
> For a specfic use case I had even the DocBook stylesheets running in
> Cocoon, so I guess it's not a problem of TEI and not of Cocoon in
> general. But you might have a look at the endorsed libs problem.
> Furthermore it would be interesting to know the xslt processor you use.
>
The XSLT processor I use is Xalan (sorry I can't figure out what the
version is) that comes with Cocoon 2.1.5. When I tried switching to
Saxon - that's the output is the same.
Thank you very much.
Sincerely,
Nick.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org