
We were discussing this a bit during the call, but I thought I’d add here that, from what I’m reading of xsl:sequence, it seems that it’s preferable to use it in the context of functions because it preserves the XPath relationships from the document being processed—makes them part of what the function can process. See https://stackoverflow.com/questions/14361629/xslt-xslsequence-what-is-it-goo... <https://stackoverflow.com/questions/14361629/xslt-xslsequence-what-is-it-good-for> Elisa -- Elisa Beshero-Bondar, PhD Director, Center for the Digital Text | Associate Professor of English University of Pittsburgh at Greensburg | Humanities Division 150 Finoli Drive Greensburg, PA 15601 USA E-mail: ebb8@pitt.edu <mailto:ebb8@pitt.edu> Development site: http://newtfire.org <http://newtfire.org/>
On Dec 7, 2017, at 10:28 AM, Syd Bauman <s.bauman@northeastern.edu> wrote:
Finished that little test: yes, <xsl:copy-of> preserved the datatype. --------- <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0"> <xsl:output method="text"/> <xsl:template match="/"> <xsl:variable name="arbitraryDate"> <xsl:copy-of select="xs:date('2017-12-07')"/> </xsl:variable> <!-- the variable $D retains the dateness (i.e., the xs:date datatype), else the following would throw an error. --> <xsl:value-of select="format-date( $arbitraryDate,'[FNn] [D01] [MNn] [Y]')"/> <xsl:text> </xsl:text> </xsl:template> </xsl:stylesheet> --------- -- tei-council mailing list tei-council@lists.tei-c.org http://lists.lists.tei-c.org/mailman/listinfo/tei-council
PLEASE NOTE: postings to this list are publicly archived