xsl-list
[Top] [All Lists]

Re: [xsl] Saxon processing problem...

2008-03-29 10:56:56
Robert Wilkins wrote:

There are a few issues with the stylesheet itself that may or may not have anything to do the failure you're seeing:

Stylesheet

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="2.0">

    <xsl:output method="text"/>
    <xsl:output method="xml"
        doctype-public="-//OASIS//DTD DITA Composite//EN"
        doctype-system="reference.dtd"
        indent="yes"
        name="xml"/>

You have two output instructions--you probably only want one. Also, the PUBLIC ID and the system ID are not consistent with respect to the standard DITA DTDs ("Composite" should be "Reference" or "reference.dtd" should be "ditabase.dtd" depending on which one you really mean). But that shouldn't affect the processing.

    <xsl:template match="//table">
        <xsl:apply-templates mode="stategroup" select="//tbody/row[position() mod 
$grp-size=1]"/>
    </xsl:template>

Using "//" in match expressions is equivalent to not using it. You just need to say "table", which matches table in any context.

Also, the select is not what you want--it will select all tbody elements in the document--you probably just want tbody within the current table, which would be best specified as select="*/tbody/row[position() mod $grp-size=1].

And this expression looks a little fishy since $grp-size=1 will return a boolean value which is probably not a meaningful argument for "mod".

    <xsl:template match="//tbody/row" mode="stategroup">

Ditto.

Cheers,

Eliot

--
Eliot Kimber
Senior Solutions Architect
"Bringing Strategy, Content, and Technology Together"
Main: 610.631.6770
www.reallysi.com
www.rsuitecms.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--