My favorites
|
Sign in
officepipes
XML Pipelines for Office Documents
Project Home
Downloads
Wiki
Issues
Source
Checkout
|
Browse
|
Changes
|
r2
Source path:
svn
/
trunk
/
odf-compare
/
make-fingerprint.xsl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?xml version="1.0"?>
<xsl:transform version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<fingerprint>
<xsl:variable name="docelem" select="/*"/>
<xsl:for-each select="distinct-values(//namespace::*)">
<xsl:sort/>
<xsl:variable name="uri" select="."/>
<xsl:message>Processing namespace <xsl:value-of select="$uri"/></xsl:message>
<namespace name="{.}">
<xsl:variable name="all-elements-in-ns">
<xsl:for-each select="$docelem//*[namespace-uri()=$uri]">
<e>
<xsl:value-of select="local-name(.)"/>
</e>
</xsl:for-each>
</xsl:variable>
<xsl:for-each select="distinct-values($all-elements-in-ns//*)">
<xsl:sort/>
<xsl:variable name="lname" select="."/>
<element name="{$lname}"
count="{count($docelem//*[local-name()=$lname and namespace-uri()=$uri])}"/>
</xsl:for-each>
</namespace>
</xsl:for-each>
</fingerprint>
</xsl:template>
</xsl:transform>
Show details
Hide details
Change log
r2
by alex.brown.gb on Jun 14, 2009
Diff
[No log message]
Go to:
/trunk/odf-compare
...odf-compare/make-fingerprint.xsl
/trunk/odf-compare/odfcompare.xml
/trunk/odf-compare/style-diffs.xsl
/trunk/odf-validate
...nk/odf-validate/odf-validate.xml
Project members,
sign in
to write a code review
Older revisions
All revisions of this file
File info
Size: 1135 bytes, 28 lines
View raw file
Hosted by