Mercurial > hg > ooxml
annotate shared.xsl @ 68:95faecfcc1b5
consistent defn style
author | Henry S. Thompson <ht@markup.co.uk> |
---|---|
date | Mon, 12 Jun 2017 17:20:24 +0200 |
parents | 5d9806f90896 |
children |
rev | line source |
---|---|
48
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
1 <?xml version='1.0'?> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
2 <!DOCTYPE doc SYSTEM "../../../lib/xml/xsl.dtd" > |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
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 e xf" xmlns="http://markup.co.uk/excel" xmlns:xf="http://www.w3.org/2005/xpath-functions"> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
4 |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
5 <xsl:template match="/"> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
6 <masters><xsl:apply-templates select="/s:worksheet/s:sheetData"/></masters> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
7 </xsl:template> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
8 |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
9 <xsl:template match="s:sheetData"> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
10 <xsl:variable select="s:row/s:c/s:f[@si]" name="sfs"/> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
11 <xsl:variable name="indices" select="distinct-values(for $sf in $sfs/@si return string($sf))"> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
12 <!-- s:f/@si values --> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
13 </xsl:variable> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
14 |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
15 <xsl:for-each select="$indices"> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
16 <xsl:variable name="i" select="."/> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
17 <xsl:variable name="sf" select="($sfs[@si=$i])[1]"/> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
18 <master si="{$i}" r="{$sf/../@r}"><xsl:value-of select="$sf"/></master> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
19 </xsl:for-each> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
20 </xsl:template> |
5d9806f90896
basic integration of shared, but copying <f> is wrong, should reconstruct by denormalising <nf> for new home
Henry S. Thompson <ht@markup.co.uk>
parents:
diff
changeset
|
21 </xsl:stylesheet> |