Mercurial > hg > ooxml
comparison refs.xsl @ 17:a874f2a81ed2
default vis pipeline to raw xml, start extracting refs
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Tue, 04 Apr 2017 15:30:04 +0100 |
parents | |
children | 16bba7a0d0bd |
comparison
equal
deleted
inserted
replaced
16:2bbd067529b6 | 17:a874f2a81ed2 |
---|---|
1 <?xml version='1.0'?> | |
2 <!DOCTYPE doc SYSTEM "../../../lib/xml/xsl.dtd" > | |
3 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0" xmlns:s="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:e="http://markup.co.uk/excel" exclude-result-prefixes="xs s" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main"> | |
4 <xsl:variable name="pat1">("[^"]*")|(\{[^}]+})|(,)|([^=\-+*/();:,.$<>^!]+(?:\.[^=\-+*/();:,.$<>^!]+)*\()|([)])|(^=|\()|((?:'[^']+')|(?:\[[0-9]+\][^!]*))|(\$?[A-Z]+\$?[0-9]+)|([a-zA-Z_\\][a-zA-Z0-9._]*)|(.)</xsl:variable> | |
5 <xsl:param name="pat" select="$pat1"/> | |
6 | |
7 <xsl:template match="/"> | |
8 <e:refs><xsl:apply-templates select="//s:f"/></e:refs> | |
9 </xsl:template> | |
10 | |
11 <xsl:template match="s:f"> | |
12 <xsl:variable name="tokens" select="analyze-string(.,$pat)"/> | |
13 <xsl:copy-of select="$tokens"/> | |
14 </xsl:template> | |
15 </xsl:stylesheet> |