You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The idea here seems to be:
Whenever the mode is changelog, perform the match. However, it
seems that the mode is checked after the match is (positively)
perfomed. Further, for some reason, the request to evaluate local-name() = 'date' for a set of nodes causes all of them to be
stored in a nodeset, which is limited to a size of 10^7.
An easy fix (1) for this problem is to give an absolute path (retaining
the unusual leaf condition):
Alternatively (2), one might remove the restriction that <date/> must
be the first child:
<xsl:templatemode="changelog"match="date[1]"/>
Further, I wonder whether the purpose of this line--ignoring the date
element, whose value is obtained and used in the parent node's
template--cannot be achieved by easier means. I am entirely new to XSLT
though.
Finally, I wonder whether
using mode="changelog" is a good idea at all--except possibly for
documentation,
absolute paths should be used consistently, at least to parse the
header, but possibly also (parts of) the body.
Anyways, as a quick fix I suggest option (1).
The text was updated successfully, but these errors were encountered:
An easy fix (1) for this problem is to give an absolute path (retaining
the unusual leaf condition):
```xslt
<xsl:template mode="changelog" match="/tei:TEI/tei:teiHeader/tei:revisionDesc/tei:change/tei:*[1][local-name() = 'date']"/>
```
Can you please hand in a patch or pull request? That would be appreciated.
This avoids an error to be printed in a case where the input is very
large (e.g., deu-eng). The error is neither fatal nor does it change
the expected header output.
See in-line documentation and issue #31 [0] for more information.
[0] #31
Given
deu-eng-phonetics.tei
, upon running$ xsltproc --novalid --xinclude --stringparam dictname deu-eng --path /path/to/deu-eng/ /path/to/xsl/tei2c5.xsl build/tei/deu-eng-phonetics.tei >build/dictd/deu-eng.c5
as per the Makefiles,
the following error is printed 3 times, after a relatively short time:
(as I was reminded here)
The error is non-fatal, and the output is as expected.
The error is linked to the following line in
xsl/inc/teiheader2txt.xsl
:The idea here seems to be:
Whenever the
mode
ischangelog
, perform thematch
. However, itseems that the
mode
is checked after thematch
is (positively)perfomed. Further, for some reason, the request to evaluate
local-name() = 'date'
for a set of nodes causes all of them to bestored in a
nodeset
, which is limited to a size of10^7
.An easy fix (1) for this problem is to give an absolute path (retaining
the unusual leaf condition):
Alternatively (2), one might remove the restriction that
<date/>
mustbe the first child:
Further, I wonder whether the purpose of this line--ignoring the
date
element, whose value is obtained and used in the parent node's
template--cannot be achieved by easier means. I am entirely new to XSLT
though.
Finally, I wonder whether
mode="changelog"
is a good idea at all--except possibly fordocumentation,
header, but possibly also (parts of) the body.
Anyways, as a quick fix I suggest option (1).
The text was updated successfully, but these errors were encountered: