2012-03-14 7 views

答えて

1

使用:ここ

substring-before(/*/elem[1]/@attr, '
') 

はXSLTである - ベースの検証:この変換は、(整形式に補正提供されるXML文書に適用されるとき

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
<xsl:output omit-xml-declaration="yes" indent="yes"/> 
<xsl:strip-space elements="*"/> 

<xsl:template match="/"> 
    <xsl:copy-of select="substring-before(/*/elem[1]/@attr, '&#x0A;')"/> 
</xsl:template> 
</xsl:stylesheet> 

! ):

<doc> 
    <elem attr="firstLine &#x0a; secondLine"/> 
    <elem attr="1stLine"/> 
</doc> 

XPatを評価します。この評価の結果を出力する

firstLine 
関連する問題