Mercurial > hg > ooxml
diff 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 |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/refs.xsl Tue Apr 04 15:30:04 2017 +0100 @@ -0,0 +1,15 @@ +<?xml version='1.0'?> +<!DOCTYPE doc SYSTEM "../../../lib/xml/xsl.dtd" > +<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"> + <xsl:variable name="pat1">("[^"]*")|(\{[^}]+})|(,)|([^=\-+*/();:,.$<>^!]+(?:\.[^=\-+*/();:,.$<>^!]+)*\()|([)])|(^=|\()|((?:'[^']+')|(?:\[[0-9]+\][^!]*))|(\$?[A-Z]+\$?[0-9]+)|([a-zA-Z_\\][a-zA-Z0-9._]*)|(.)</xsl:variable> + <xsl:param name="pat" select="$pat1"/> + + <xsl:template match="/"> + <e:refs><xsl:apply-templates select="//s:f"/></e:refs> + </xsl:template> + + <xsl:template match="s:f"> + <xsl:variable name="tokens" select="analyze-string(.,$pat)"/> + <xsl:copy-of select="$tokens"/> + </xsl:template> +</xsl:stylesheet>