Mercurial > hg > ooxml
diff n2a.xsl @ 52:9bb415e0adc9
try to fix error processin odd REUTER|IDN\!'.SPX' external ref
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Tue, 16 May 2017 17:28:52 +0100 |
parents | d3569a8cbf7a |
children | adeb9575b273 |
line wrap: on
line diff
--- a/n2a.xsl Tue May 16 17:27:19 2017 +0100 +++ b/n2a.xsl Tue May 16 17:28:52 2017 +0100 @@ -43,7 +43,7 @@ e:crnf($r)) else if (local-name($b)='v') then $b/text() - else e:shouldnt()"/> + else e:shouldnt('rnf',concat(local-name($b),' ',string($b)))"/> </xsl:function> <xsl:function name="e:fnf" as="xs:string"> @@ -91,7 +91,7 @@ <xsl:value-of select="if (local-name($c)='a') then xs:integer($c/text()) else if (local-name($c)='r') then xs:integer($c/@d)+$h - else e:shouldnt()"/> + else e:shouldnt('delta',local-name($c))"/> </xsl:function> <xsl:template match="e:*|@*" mode="shift"> @@ -106,6 +106,8 @@ </xsl:template> <xsl:function name="e:shouldnt"> - <xsl:message terminate="yes">shouldn't happen</xsl:message> + <xsl:param name="where" as="xs:string"/> + <xsl:param name="what" as="xs:string"/> + <xsl:message terminate="yes">shouldn't happen in <xsl:value-of select="$where"/>: <xsl:value-of select="$what"/></xsl:message> </xsl:function> </xsl:stylesheet>