[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: PIs with XT
At 00/03/21 17:06 +0100, Beckers, Marc wrote:
My XSL stylesheet for HTML then has: 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|