|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Advice for splitting text
[Dmitre Said]
>Then the two text nodes already exist and do not need to be "split". When
>formatting:breakArticle is the current node they will be selected like
this:
> ../text()[1]
>and
> ../text(2)
>Of course, in the xml document there must be a namespace declaration
binding
>the "formatting" prefix. A prefix, bound to the same namespace-uri will be
>convenient to use in the xslt code.
I'm not sure if this makes a difference, but my special
<formatting:breaknews> element is found within attribute value. So I'm
having difficulties using the text() function. Here is what I have, 2
things (1) I am trying to test for the occurence of this special "format"
element, and (2) i'm not sure how to actually reference the 1st text node of
an attribute to display.
<xsl:template match="z:row" mode="az_news">
<tr>
<td class="news_heading">
<xsl:value-of select="@aznewsheading"/>
<xsl:call-template name="ADD_EDIT_LINKS">
<xsl:with-param name="DOC">gym_news</xsl:with-param>
<xsl:with-param name="P">aznewsid</xsl:with-param>
</xsl:call-template>
</td>
</tr>
<tr>
<td class="news_content">
<xsl:choose>
<xsl:when test="@aznews/formatting:breakArticle">
<!-- break article on formatting:breakarticle -->
<xsl:value-of disable-output-escaping="yes"
select="@aznews/text()[1]"/>
</xsl:when>
<xsl:otherwise>
<!-- no article break -->
<xsl:value-of disable-output-escaping="yes" select="@aznews"/>
</xsl:otherwise>
</xsl:choose>
</td>
</tr>
</xsl:template>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








