[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Saxon processing problem...

Subject: Re: Saxon processing problem...
From: Eliot Kimber <ekimber@xxxxxxxxxxxx>
Date: Sat, 29 Mar 2008 12:56:14 -0500
Re:  Saxon processing problem...
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.