2016-12-10 17 views
0

XMLにURLがあります。xsl v.1を通過しようとしています。 xmlにはURLの後に '?'で始まる乱数が入っています。XSLT URL文字列の最後の文字を削除する

<Pictures> 
    <url>http://photos.somewhere.cm/82873604/photos/1.jpg?20161010170035</url> 
    <url>http://photos.somehwere.cm/82873604/photos/2.jpg?20161010170035</url> 
<Pictures> 

現在、私のXSLは、私は後にすべてのテキストを取り除くにはどうすればよい

<attachments> 
    <xsl:for-each select="Pictures/url"> 
    <image> 
     <xsl:value-of select="url" /> 
    </image> 
    </xsl:for-each> 
</attachments> 

のように見えます '?'あなただけの助けを借りてお待ちしております。

<attachments> 
    <image>http://photos.somewhere.cm/82873604/photos/1.jpg?</image> 
    <image>http://photos.somehwere.cm/82873604/photos/2.jpg?</image> 
<attachments> 

ご協力ありがとうございます。

サイディア。

+0

まあ@先端ため

<attachments> <xsl:for-each select="Pictures/url"> <image><xsl:value-of select="substring-before(node(),'?')"/></image> </xsl:for-each> </attachments> 

おかげで、XSLT 1.0はその機能のHTTPSのXPath 1.0の仕様をチェックするXPath 1.0に基づいています。 org/TR/xpath /#function-substring - ジョブを実行する前。 –

答えて

1

が、私はそれを考え出した://www.w3:M. Honnen

関連する問題