projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
added tests for bug #883 'Need an 'ignore' value for the z:type
[idzebra-moved-to-github.git]
/
test
/
xslt
/
index.xsl
diff --git
a/test/xslt/index.xsl
b/test/xslt/index.xsl
index
ccdec83
..
1da8fb1
100644
(file)
--- a/
test/xslt/index.xsl
+++ b/
test/xslt/index.xsl
@@
-1,8
+1,9
@@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://www.loc.gov/MARC21/slim"
xmlns:z="http://indexdata.dk/zebra/xslt/1"
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:m="http://www.loc.gov/MARC21/slim"
xmlns:z="http://indexdata.dk/zebra/xslt/1"
+ exclude-result-prefixes="m z"
version="1.0">
version="1.0">
- <!-- $Id: index.xsl,v 1.4 2005-06-24 13:45:54 adam Exp $ -->
+ <!-- $Id: index.xsl,v 1.7 2007-02-15 13:01:00 marc Exp $ -->
<xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
<xsl:output indent="yes" method="xml" version="1.0" encoding="UTF-8"/>
@@
-10,23
+11,32
@@
<xsl:template match="/m:record">
<xsl:template match="/m:record">
- <z:record id="{normalize-space(m:controlfield[@tag='001'])}">
+ <z:record z:id="{normalize-space(m:controlfield[@tag='001'])}"
+ z:rank="{normalize-space(m:rank)}"
+ >
<xsl:apply-templates/>
</z:record>
</xsl:template>
<xsl:template match="m:controlfield[@tag='001']">
<z:index name="control">
<xsl:apply-templates/>
</z:record>
</xsl:template>
<xsl:template match="m:controlfield[@tag='001']">
<z:index name="control">
- <xsl:value-of select="."/>
+ <xsl:value-of select="normalize-space(.)"/>
</z:index>
</xsl:template>
<xsl:template match="m:datafield[@tag='245']/m:subfield[@code='a']">
</z:index>
</xsl:template>
<xsl:template match="m:datafield[@tag='245']/m:subfield[@code='a']">
+ <!-- nested. does not have to be! -->
<z:index name="title">
<z:index name="title">
+ <z:index name="title" type="p">
+ <xsl:value-of select="."/>
+ </z:index>
+ </z:index>
+
+ <!-- can do. But sort register only supports numeric attributes. -->
+ <z:index name="title" type="s">
<xsl:value-of select="."/>
</z:index>
<xsl:value-of select="."/>
</z:index>
- </xsl:template>
-
+ </xsl:template>
</xsl:stylesheet>
</xsl:stylesheet>