fix xslt template
€18-36 EUR / 時間
We have one a database that we publish data on a web using a xslt, the main issue is that the data in access is not homogeneius and the xslt template gives us wrong result depending the value in the database
We have a database with values $a, $b ... $a is not repetible, but $b it may be one or more
At the end of each $a , $b or $c it may appear a dot '.' or not in the database
$a AAAA
$b BBBB
$b CCCC
We wish to show always "AAAA. BBBB. CCCC" the xslt should manage if there is '.' or not... if there is a '.' just add a blank space, if not add '. '
This is the current xslt, but now it is not managing at all spaces and '.'
<xsl:template name="nameABCDN">
<xsl:for-each select="marc:subfield[@code='a']">
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString" select="."/>
</xsl:call-template>
</xsl:for-each>
<xsl:for-each select="marc:subfield[@code='b']">
<xsl:value-of select="."/>
<xsl:choose>
<xsl:when test="position() != last()">
<xsl:text> -- </xsl:text>
</xsl:when>
</xsl:choose>
</xsl:for-each>
<xsl:template name="chopPunctuation">
<xsl:param name="chopString"/>
<xsl:variable name="length" select="string-length($chopString)"/>
<xsl:choose>
<xsl:when test="$length=0"/>
<xsl:when test="contains('.:/ ', substring($chopString,$length,1))">
<xsl:call-template name="chopPunctuation">
<xsl:with-param name="chopString" select="substring($chopString,1,$length - 1)"/>
</xsl:call-template>
</xsl:when>
<xsl:when test="not($chopString)"/>
<xsl:otherwise><xsl:value-of select="$chopString"/></xsl:otherwise>
</xsl:choose>
</xsl:template>
プロジェクトID: #7976379
プロジェクトについて
11 人のフリーランサーが、平均€23/時間で、この仕事に入札しています。
Hello, I’d like to be considered for your project. I am a senior developer with over 20 years of experience in software development, using mainly open source technologies (PHP, Zend Framework, CodeIgniter, Apache, もっと
George Bailey here from Los Angeles, USA. I am expert in XSLT and have done similar task already. I would like to help you out in the project. Hope to hear back soon, Regards,
Hi, I have strong skills in XSLT development and years of experience. -------------------------------------------------------------------------------