-
Notifications
You must be signed in to change notification settings - Fork 87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update data.temporal.iso #2249
Comments
With regard to the last statement, I would say, instinctively, that the changes in the ISO standard are perhaps not enough to deprecate attributes other than
So I'd suggest making it possible for users to only keep |
Either way, yes, updating to ISO 8601:2019 is in the cards, and the preliminary step is on my to-do list. I had plans to do some significant work in this area first over winter break 2020–2021, but COVID problems hit others around me forcing me to take on other responsibilities; and then again over winter break 2021–2022, but I got quite sick myself (not COVID). I do not expect to make any progress on this for another month or so, but am very hopeful after that … And, BTW, my thoughts are to do both — support the entirety of 8601:2019 (both parts), and still permit the old |
…bout not using 24:00 is no longer needed because ISO 8601 2019 disallows it anyway, so para is deleted.
Council F2F: we removed the remark; |
Just noting that I added my comment to wrong ticket. I moved it to #2227 . |
The integration of EDTF will be particularly significant within |
The same applies to the Propyläen project, in particular the |
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="#all"
version="3.0">
<xsl:mode on-no-match="shallow-copy"/>
<xsl:template match="@*[ ends-with( name(.), '-custom') ]">
<xsl:variable name="oldName" select="name(.)"/>
<xsl:variable name="strippedName" select="substring-before( $oldName, '-custom')"/>
<xsl:variable name="newName" select="$strippedName||'-iso'"/>
<xsl:attribute name="{$newName}" select="."/>
</xsl:template>
</xsl:stylesheet> Note that the only template above is purposefully somewhat verbose to make it easy to figure out what is going on. It could just as well be written <xsl:template match="@*[ name(.) => ends-with('-custom') ]">
<xsl:attribute name="{substring-before( name(.), '-custom')||'-iso'}" select="."/>
</xsl:template> And, of course, this only works because there are no other attributes in TEI that end with “-custom”. 🤓 Updating your XSLT (or XQuery, I suppose) programs is a little tougher to do in XSLT, but still not that difficult. And it is trivial to just use a sledgehammer approach: perl -p -i.bak -e 's,(\@(tei:)?(when|notBefore|notAfter|from|to))-custom,$1-iso,g;' /path/to/program.xslt The problem with this approach is the entry <change when="2023-09-17" who="#ilte">
Changed all @when-custom attributes to @when-iso attributes.
</change> gets changed to <change when="2023-09-17" who="#ilte">
Changed all @when-iso attributes to @when-iso attributes.
</change> which is kinda unhelpful. |
TEI should adopt the updates to ISO 8601 published in 2019.
E.g. it eliminates the possibility to encode "24:00", which we specifically address in the remarks in
data.temporal.iso
.However, it needs to be discussed if this will be just a minor update, or if we should remodel it completely, as ISO 8601 now comes in two parts.
The second part (ISO 8601-2:2019) allows e.g. ranges. So if we adopt the complete standard (as somewhat suggested by the name
data.temporal.iso
) we could boil it down to@when-iso
, because@notAfter-iso
,@notBefore-iso
,@from-iso
, and@to-iso
can now all be written in one expression.The text was updated successfully, but these errors were encountered: