Here's another go at the pipeline namespace problem.
AxKit is 1.6.1
Using libxml 20425, libxslt 10019 and libexslt 710

/=======================================================\
 a_instance.xml
 The source document.
\=======================================================/
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="test1.xsl" ?>
<?xml-stylesheet type="text/xsl" href="test2.xsl" ?>

<atest/>

/=======================================================\
 test1.xml
 This is applied to the above instance file.
\=======================================================/
<?xml version="1.0"?>
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  version="1.0"
  >

<xsl:template match="atest">
<btest>
<xsl:element name="rngform" namespace="http://simonwoodside.com/rng";>
<title>RNG Form</title>
</xsl:element>
</btest>
</xsl:template>
</xsl:stylesheet>


/=======================================================\
 b_instance.xml
 This file is the product of the command:
 % xsltproc test1.xsl a_instance.xml
 Or equivalently it is the same as the file
 from AxTrace named "_2fa_instance.xml.1"
 They are the same, which is as things should be.
\=======================================================/
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="test2.xsl" ?>

<btest>
  <rngform xmlns="http://simonwoodside.com/rng";>
    <title>RNG Form</title>
  </rngform>
</btest>

/=======================================================\
 test2.xml
 This is applied to b_instance, the above file, when it's
 loaded with AxKit. It's also applied to a_instance, the
 first file, as the second stage, when that's loaded with
 AxKit. Note how various different namespacing prefixes
 are used (or not used) ... that will reveal the bug.
\=======================================================/
<?xml version="1.0"?>
<xsl:stylesheet
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
  xmlns:mid="http://simonwoodside.com/rng";
  version="1.0"
  >

<xsl:output method="html" indent="yes"/>

  <xsl:template match="mid:rngform";>
    <html>
      <body>
        <xsl:apply-templates/>
        <h1>
          <i>
            [should be followed by text]
            <xsl:value-of select="mid:title"/>
          </i>
        </h1>
        <u>
          [should be followed by nothing]
          <xsl:value-of select="title"/>
        </u>
     </body>
    </html>
  </xsl:template>

  <xsl:template match="mid:title";>
    <h1>
      [should be in h1]
      <xsl:apply-templates/>
    </h1>
  </xsl:template>
</xsl:stylesheet>



/=======================================================\
 OUTPUT A
 http://localhost/exp/bug1/a_instance.xml
 Demonstrates the incorrect output.
\=======================================================/
<html>
  <body>
    RNG Form
    <h1>
      <i>
        [should be followed by text]
      </i>
    </h1>
    <u>
      [should be followed by nothing]
      RNG Form
    </u>
  </body>
</html>

/=======================================================\
 OUTPUT B
 http://localhost/exp/bug1/b_instance.xml
 Demonstrates the correct output.
\=======================================================/
<html>
  <body>
    <h1>
      [should be in h1]
      RNG Form
    </h1>
    <h1>
      <i>
        [should be followed by text]
        RNG Form
      </i>
    </h1>
    <u>
      [should be followed by nothing]
    </u>
  </body>
</html>


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to