2016-09-15 24 views
-3

私は継続時間に継続時間計算

<EstimatedTime> 
    <Value>PT0H3M05S</Value> 
</EstimatedTime> 

を以下している予想される出力は、

03.05

任意のアイデアくださいです。

+0

あなたは、XSLTの文字列関数を使用して文字列を解析する必要があります... http://zvon.org/xxl/XSLTreference/Output /xpathFunctionIndex.html –

+0

検索によって解決策が見つかりました:[answer](http://stackoverflow.com/questions/14955794/use-of-xsd-duration-type-using-xslt-to-out-put-value-普通のデュアションフォーマット) – uL1

答えて

0

あなたのプロセッサは、あなたが使用することができますXSLT 2.0を、サポートしている場合:

<xsl:template match="EstimatedTime"> 
    <xsl:value-of select="format-number(minutes-from-duration(Value), '00')"/> 
    <xsl:text>.</xsl:text> 
    <xsl:value-of select="format-number(seconds-from-duration(Value), '00')"/> 
</xsl:template> 
+0

これは私が受け取りたいものです、ありがとう –