xsl-list
[Top] [All Lists]

Re: [xsl] Display text and all the following nodes except <anchor> and <pb>

2008-09-18 04:27:45
It is working fine in the below example
<head>O<sCap>FFICERS</sCap> of <person>the</person> R<sCap>EGIMENT</sCap> of
I<sCap>NFANTRY</sCap><anchor id="JHXMA0192"/><pb n="FFCP0002-52"/></head>

but it is not working in this
<head>
<title>(1) Exddd<anchor id="JHXMA0192"/><anchor id="JHXMA2911"/>dddnor <person>Williadddunt</person> to dddde</title>
</head>
the output of the above should be
<h1>(1) Exddd dddnor Williadddunt to dddde</h1>
Thanks a lot!!!

At 01:35 PM 9/18/2008, Syd Bauman wrote:
<!-- process <head> specially: ignore child <anchor> or <pb> -->
  <xsl:template match="head">
    <xsl:element name="h1">
      <xsl:apply-templates
        select="@*
          |*[not(name(.)='anchor' or name(.)='pb')]
          |text()
          |comment()
          |processing-instruction()"
      />
    </xsl:element>
  </xsl:template>


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