xs:date を使用する場合、XSD/XML 内で YYYY-MM-DD としてレイアウトする必要があることがわかっているため、XML から XSLT 1.0 にプルしたときにテキストを DD-MM-YYYY として表示するようにフォーマットしようとしています。使用済み。
これが私が取り組んでいるコードです。これをどのように表示すべきかについてのアドバイスはありますか?
XML
<?xml version="1.0" encoding="ISO-8859-1"?>
<events xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="events.xsd">
<venue id="01"
vtitle="ExCeL Exhibition Centre"
location="London"
telephone="0844 448 7600">
<event name="Doctor Who 50th Celebration" date="2013-10-22">
<image>images/doctor50.jpg</image><attribute>Doctor Who Event</attribute>
<description>A 50th Anniversary musical bonanza for Doctor Who.</description>
<ticket_price type="adult" status="available">£25.00</ticket_price>
<ticket_price type="child" status="none">£11.00</ticket_price>
<ticket_price type="junior" status="available">£0.00</ticket_price>
<email>info@roundhouselondon.com</email>
</event>
</venue>
XSD
<xs:attribute name="date" type="xs:date"/>
XSLT
<xsl:element name="date"><xsl:value-of select="@date"/></xsl:element>
HTML
<date>2013-10-22</date>