<?xml version="1.0" encoding="UTF-8"?>
<clientlist>
<client>
<data key="id" value="111" />
<data key="name" value="The Parlotones" />
<data key="genre" value="Rock/Alternative" />
<data key="description" value="The Parlotones are known for their electric, polished stage performances delivered against the backdrop of their deftly crafted and darkly romantic lyrics." />
<data key="performanceday" value="Sunday" />
<data key="performancetime" value="01PM-03PM" />
<data key="picture" value="the-parlotones.jpg" />
</client>
<client>
<data key="id" value="222" />
<data key="name" value="ShortStraw" />
<data key="genre" value="Folk/Acoustic" />
<data key="description" value="Shortstraw are a joburg based band making waves on the national indie music scene in a big way." />
<data key="performanceday" value="Sunday" />
<data key="performancetime" value="03PM-05PM" />
<data key="picture" value="shortstraw.jpg" />
</client>
<client>
<data key="id" value="333" />
<data key="name" value="Gangs of Ballet" />
<data key="genre" value="Dance/Club" />
<data key="description" value="Their music, which combines their fresh energy with their musically intriguing melodies and arrangements, has a hauntingly anthemic sound." />
<data key="performanceday" value="Saturday" />
<data key="performancetime" value="11AM-01PM" />
<data key="picture" value="gangs-of-ballet.jpg" />
</client>
</clientlist>
私は助けが出力されて、XSLとBASHを使用して、私の出力ファイルに、デジタル時代に、私のソースファイルから例えば(15:00)3つのPM/3AM時間を変換たいXML文書。デジタル時間に文字列の書式を設定する
これは、私は、XSLで、これまで持っているものです。
<xsl:if test="not(PM)">
<starts>
<xsl:value-of select="number(substring before(data[@key='performancetime']/@value, '-'))" ></xsl:value-of>
</starts>
この結果はNaNの値が全て「開始」に登場し、回「終了」です。
私は本当に、いくつかの助けが必要ありがとう:)
入力の例(または2つ)を表示してください。 –
@ michael.hor257k入力ファイルを追加しました。 – KhanyisileC
http://stackoverflow.com/help/someone-answers –