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

Re: PIs with XT

Subject: Re: PIs with XT
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 21 Mar 2000 11:31:38 -0500
Re: PIs with XT
At 00/03/21 17:06 +0100, Beckers, Marc wrote:
My XSL stylesheet for HTML then has:

<!-- processing instruction for new line -->
  <xsl:template name="processing-instruction(newline)">
    <br/>
  </xsl:template>

The output HTML shows nothing.
I get the same result with <xsl:template name="processing-instruction()">.

Two things:


(1) - you are using name= instead of match=

(2) - when supplying a PITarget literally, it must be a literal.

Can anyone shed light?

I hope the example below helps.


............... Ken

T:\ftemp>type pi.xml
<?xml version="1.0"?>
<test>
This is a test<?newline?>of text
</test>
T:\ftemp>type pi.xsl
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                version="1.0">

<xsl:template match="/">                         <!--root rule-->
 <result>
  <test1>
   <xsl:apply-templates mode="test1"/>
  </test1>
  <test2>
   <xsl:apply-templates mode="test2"/>
  </test2>
 </result>
</xsl:template>

<xsl:template match="processing-instruction('newline')"
              mode="test1">
  <br/>
</xsl:template>

<xsl:template match="processing-instruction()"
              mode="test2">
  <br/>
</xsl:template>

</xsl:stylesheet>

T:\ftemp>xt pi.xml pi.xsl
<?xml version="1.0" encoding="utf-8"?>
<result><test1>
This is a test<br/>of text
</test1><test2>
This is a test<br/>of text
</test2></result>
T:\ftemp>

--
G. Ken Holman                    mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.             http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999   (Fax:-0995)
Web site: XSL/XML/DSSSL/SGML services, training, libraries, products.
Practical Transformation Using XSLT and XPath      ISBN 1-894049-04-7
Next instructor-led training:    2000-05-02,2000-05-11/12,2000-05-15,
-                                    2000-06-12,2000-06-13,2001-01-27


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



Current Thread
  • PIs with XT
    • Beckers, Marc - Tue, 21 Mar 2000 17:06:59 +0100
      • G. Ken Holman - Tue, 21 Mar 2000 11:31:38 -0500 <=
        • stu - Wed, 22 Mar 2000 09:24:08 +0000

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.