xsl-list
[Top] [All Lists]

Re: [xsl] Embedded bold,italic,anchors etc.

2008-06-11 05:08:17
Craig Riley wrote:

For example I have:

<p>some text <italic>some italic text</italic></p>

which could happen in numerous paragraphs within the document.

Whenever I "call" the template the peice of italix text is displayed outside of the paragraph text! I don't know how to convert the italic tags into <i></i> tags and keep it within the main body of text?

If you do

  <xsl:template match="/">
    <html>
      <body>
        <xsl:apply-templates/>
      </body>
    </html>
  </xsl:template>

  <xsl:template match="p">
    <p>
     <xsl:apply-templates/>
    </p>
  </xsl:template>

  <xsl:template match="italic">
    <i>
      <xsl:apply-templates/>
    </i>
  </xsl:template>

that you get the result you want.


--

        Martin Honnen
        http://JavaScript.FAQTs.com/

--~------------------------------------------------------------------
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>
--~--