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

xsl-list
[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"/>
  </xsl:template>

?

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: https://www.CraneSoftwrights.com/links/udemy.htm |
Crane Softwrights Ltd.            https://www.CraneSoftwrights.com/s/ |
G. Ken Holman                   mailto:gkholman(_at_)CraneSoftwrights(_dot_)com 
|
Google+ profile: https://plus.google.com/116832879756988317389/about |
Legal business disclaimers:    https://www.CraneSoftwrights.com/legal |


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

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