Subject: Re: [xsl] position()!=last() works in one env, not in another From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Tue, 06 Feb 2007 21:02:11 -0800 |
I am testing in Altova XMLSpy and running in PHP5. In XMLSpy the position()!=last() works fine, but in PHP5, it is always true. Here is the code:
<xsl:template match="p:category|p:subCategory|p:imageDir" mode="menu">
<xsl:choose>
<xsl:when test="@objectID=$objectID"><xsl:value-of select="@name"/></xsl:when>
<xsl:otherwise><a href="{$self}?fldoid={@objectID}"><xsl:value-of
select="@name"/></a></xsl:otherwise>
</xsl:choose>
<xsl:if test="position()!=last()"><xsl:text
disable-output-escaping="yes">&nbsp;|&nbsp;</xsl:text></xsl:if>
</xsl:template>
Does anyone know if PHP5 (Libxslt) has any issues with this test:
<xsl:if test="position()!=last()">
<test> <a/><b/><c/> </test>
<xsl:template match="c"> <xsl:if test="position()!=last()"> ...
<xsl:if test="position()!=last()"> | </xsl:if> or <xsl:if test="position()!=last()"> | </xsl:if>
<!DOCTYPE xsl:stylesheet [ <!ENTITY nbsp " "> <!--known for HTML output, not in XML--> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> ... <xsl:if test="position()!=last()"> | </xsl:if> ...
-- World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and training G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. http://www.CraneSoftwrights.com/s/ Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] position()!=last() works in o, Sam Carleton | Thread | Re: [xsl] position()!=last() works , Sam Carleton |
[xsl] Checking a parent's attribute, Nicholas Orr | Date | Re: [xsl] Checking a parent's attri, G. Ken Holman |
Month |