Mercurial > hg > ooxml
diff a2n.xsl @ 48:5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Wed, 10 May 2017 16:52:04 +0100 |
parents | ae605b77d1e4 |
children |
line wrap: on
line diff
--- a/a2n.xsl Tue May 09 23:08:18 2017 +0100 +++ b/a2n.xsl Wed May 10 16:52:04 2017 +0100 @@ -13,13 +13,18 @@ else $lv+(26*e:a2n(substring($aa,1,$l - 1)))"/> </xsl:function> + <xsl:function name="e:pr" as="element(xpf:analyze-string-result)"> + <xsl:param name="ref" as="xs:string"/> + <xsl:sequence select="analyze-string($ref,'([$]?)([A-Z]+)([$]?)([0-9]+)')"/> + </xsl:function> + <xsl:function name="e:cr" as="element(e:s)"> <!-- Parse a single cell reference into left and right halves, either e:a(bsolute) or e:r(elocatable) --> <xsl:param name="ref" as="xs:string" required="yes"/> <xsl:param name="row" as="xs:integer" required="yes"/> <xsl:param name="col" as="xs:integer" required="yes"/> - <xsl:variable name="cr" select="analyze-string($ref,'([$]?)([A-Z]+)([$]?)([0-9]+)')"/> + <xsl:variable name="cr" select="e:pr($ref)"/> <xsl:variable name="c" select="if ($cr//xpf:group[@nr=1][text()]) then 'a' else 'r'"/> <xsl:variable name="cv" select="e:a2n($cr//xpf:group[@nr=2])"/> <xsl:variable name="r" select="if ($cr//xpf:group[@nr=3][text()]) then 'a' else 'r'"/>