Re: XSL outputting HTML from an XML source

Subject: Re: XSL outputting HTML from an XML source
From: Ariel Garza <g@xxxxxxxxxxx>
Date: Mon, 22 May 2000 10:04:12 -0700
> <xsl:template match="b|B">
>   <strong><xsl:apply-templates select="*|text()" /><strong>
> </xsl:template>

This is close to what I need but the problem I have where this template
is called.  In order for this to process a <B> tag, it would need to be
called in the same node as the <B> tag exists.  I tried to do this:

<xsl:template match="//B">
  <B><xsl:value-of select="B"/></B>
</xsl:template>

but this doesn't get applied with every template.  The root of my
problem is that I will not necessarily know where any of these tags will
happen.  If the person entering content into the XML wants to have an
underline or italics inline with other content, they would probably put
<i>blah blah blah</i> in the middle of the XML tag.

<description>
  There is a a <i>huge</i> storm coming...
</description>

Is there a way to have a tag interpreted without prior knowledge as to
its location in the tree?  An example would be a forced <BR> in a piece
of content.  I need a block of text + HTML to exist in a single node of
XML.  If a content manager needs to put in a <B>, or <I> or wants to
have 2 paragraphs in one block, how would the XSL sheet know that you
have another paragraph or one of these style tags?  Thanks for the help,
it is very much appreciated.

Ariel


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread