Subject: RE: [xsl] xsl:copy-of O.K. on RTF, but nothing on <EMPTY/> element content (?) From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Fri, 25 Apr 2003 13:44:41 -0400 |
<xsl:variable name="messages" select="document($LookupFilename)//msgs/msg"/> <!-- binds the set of msg nodes to the variable, once, globally -->
<xsl:template match="main-msg"> <xsl:variable name="msg-name" select="@name"/> <xsl:variable name="msg-fill-contents" select="$messages[@name = $msg-name]/segment[@name = $segment]/markup"/> <!-- ...do your thing with msg-fill-contents ... BTW it's now a node-set, not an RTF as it would be using either apply-templates OR copy-of as the contents of the xsl:variable element --> </xsl:template>
I hope that helps-- Wendell
My basic question: (follow-on to my yesterday e-mail)
>> What is the difference in these two bits of markup, from the point of the XSLT processor, working on an <xsl:apply-templates> or an <xsl:copy-of> instruction? <<
+++++++++++++++++++++++++++++++++++++++++++ CODE #1: <markup> <img src="pic.gif"/></markup> << RTF +++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++ CODE #2: <markup><img src="pic.gif"/></markup> << nodeset (I believe(?)) +++++++++++++++++++++++++++++++++++++++++++
- KEYSTROKES The simple difference in keystrokes is one has a space between elements ((#1) <markup> <img>), the other doesn't ((#2) <markup><img>).
- TREE of NODES The difference in the tree of nodes visited by the XSLT processor (as revealed by CraneSoftwrights "showtree.xsl") is shown further below. (Essentially, one (#1) has an extra "Text" node).
http://www.cranesoftwrights.com/resources/showtree/showtree-20000610.xsl
- DOES IT WORK? The difference in getting results to process through <xsl:apply-templates> and <xsl:copy-of> is that: - GOOD: one works! (the one _with_ the space (#1)), - NOT GOOD: and the other does _not_! (#2)(I get "empty node list" - both Xalan and Saxon).
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] WITH-PARAM with node as a, Martinez, Brian | Thread | RE: [xsl] difference between Result, Wendell Piez |
Re: [xsl] WITH-PARAM with node as a, Andreas Schlegel | Date | RE: [xsl] FOP conversion font probl, Jack Cane |
Month |