this is a german Web-Mirror of MHONARC.ORG powered by Domainunion AG

[Top] [All Lists]

Re: [xsl] Normalizing space / XPTY0004

2013-07-30 12:08:41
At 2013-07-30 12:53 -0400, Syd Bauman wrote:
Is there some reason not to use

  <xsl:template match="Paragraph[@stylename = 'Body']">
    <xsl:apply-templates select="./TextRun/Text/@value"/>


Not that I can see ... though the "./" is redundant.

What led you to believe this was verboten?

All you are doing is pushing an attribute node at your stylesheet for matching. Note that the built-in template rule for matching an attribute simply adds the content of the attribute to the result tree, so if you don't catch the node with a template match, you may get text in your output you don't want.

I hope this helps.

. . . . . . . . . Ken

Public XSLT, XSL-FO, and UBL classes in the Netherlands     Oct 2013 |
Public XSLT, XSL-FO, UBL and code list classes in Australia Oct 2013 |
Contact us for world-wide XML consulting and instructor-led training |
Free 5-hour lecture: |
Crane Softwrights Ltd.   |
G. Ken Holman                   mailto:gkholman(_at_)CraneSoftwrights(_dot_)com 
Google+ profile: |
Legal business disclaimers: |

XSL-List info and archive:
To unsubscribe, go to:
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>

<Prev in Thread] Current Thread [Next in Thread>