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

Differences between Saxon, XT and Xalan: testing an attribut

Subject: Differences between Saxon, XT and Xalan: testing an attribute value
From: "Martin Sevigny" <sevigny@xxxxxxxxx>
Date: Wed, 29 Mar 2000 12:39:03 +0200
saxon xt
Hi all,

I've simplified my problem to this XML document:

<?xml version="1.0" ?>
<Record id='1'>
  <Field No="606">
    <Subfield No="x">Use</Subfield>
  </Field>
</Record>

to which I apply the following stylesheet:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" indent="yes"/>
  <xsl:template match="Record">
    <TestRecord>
      <xsl:apply-templates/>
    </TestRecord>
  </xsl:template>
  <xsl:template match="Field[@No='606']/Subfield[@No='x']">
    <GotAMatch><xsl:apply-templates/></GotAMatch>
  </xsl:template>
</xsl:stylesheet>

With both XT (version 19990511) and Xalan (version 0.19.5, not tested with the latest release), I get what I expected, which is:

<?xml version="1.0" encoding="utf-8"?>
<TestRecord>
  <GotAMatch>Use</GotAMatch>
</TestRecord>

But with Saxon (version 5.2), I get the following:

<TestRecord>
  Use
</TestRecord>

It looks like the template matching "Field[@No='606']/Subfield[@No='x']" is never fired.

If I change this template to this:

<xsl:template match="Field[@No='606']">
  <GotAMatch><xsl:apply-templates/></GotAMatch>
</xsl:template>

or this

<xsl:template match="Subfield[@No='x']">
  <GotAMatch><xsl:apply-templates/></GotAMatch>
</xsl:template>

Now the three processors give me the expected result, identical to the first one.

It looks a lot like a bug in Saxon, but may be I'm missing an obscure part in the XSL specs?

Thank's for any info,

Martin Sevigny
sevigny@xxxxxxxxx


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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.