InsertFalsePrecision2.xsl

TEI datatypes permit times on the value= attribute of the various date &amp; time elements to be expressed to any precision (year, month, day, hour, minute, second, or decimal fraction of a second). However, because the W3C XML Schema datatypes for times do not permit precision to the hour or minute, there exists software that does not handle these values. E.g., such software will reject "13:30" but accept "13:30:00". This styleseet (as well as a less powerful version that works with XSLT 1 processors) converts times that are precise to only the minute or hour to times that are precise to the second.

 

              <xsl:copy-of select="@*"/> <xsl:attribute name="value"> <xsl:value-of select="$newValue"/> </xsl:attribute> <xsl:apply-templates/> </xsl:element> </xsl:template>

</xsl:stylesheet>