Apache Solr open-source search software
LUCENE-6732: Remove tabs XSL files
Uwe Schindler763c8d726cc3
diff --git a/build.xml b/build.xmlindex cdc457b5ff7..fcd8a9efcd3 100644--- a/build.xml+++ b/build.xml@@ -131,7 +131,7 @@import org.apache.tools.ant.BuildException;def extensions = [- 'java', 'jflex', 'py', 'pl', 'g4', 'jj', 'html', 'js', 'xml'+ 'java', 'jflex', 'py', 'pl', 'g4', 'jj', 'html', 'js', 'xml', 'xsl'];def invalidPatterns = [(~$/@author\b/$) : '@author javadoc tag',diff --git a/lucene/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/query.xsl b/lucene/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/query.xslindex 3be114c2a1c..9bc59e0d297 100644--- a/lucene/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/query.xsl+++ b/lucene/demo/src/resources/org/apache/lucene/demo/xmlparser/WEB-INF/query.xsl@@ -18,57 +18,57 @@<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/Document"><BooleanQuery>- <!-- Clause if user selects a preference for type of job - apply choice of- permanent/contract filter and cache -->- <xsl:if test="type">- <Clause occurs="must">- <ConstantScoreQuery>- <CachedFilter>- <TermsFilter fieldName="type"><xsl:value-of select="type"/></TermsFilter>- </CachedFilter>- </ConstantScoreQuery>- </Clause>- </xsl:if>-- <!-- Use standard Lucene query parser for any job description input -->- <xsl:if test="description">- <Clause occurs="must">- <UserQuery fieldName="description"><xsl:value-of select="description"/></UserQuery>- </Clause>- </xsl:if>-- <!-- If any of the location fields are set OR them ALL in a Boolean filter and cache individual filters -->- <xsl:if test="South|North|East|West">- <Clause occurs="must">- <ConstantScoreQuery>- <BooleanFilter>- <xsl:for-each select="South|North|East|West">- <Clause occurs="should">- <CachedFilter>- <TermsFilter fieldName="location"><xsl:value-of select="name()"/></TermsFilter>- </CachedFilter>- </Clause>- </xsl:for-each>- </BooleanFilter>- </ConstantScoreQuery>- </Clause>- </xsl:if>-- <!-- Use XSL functions to split and zero pad salary range value -->- <xsl:if test="salaryRange">- <Clause occurs="must">- <ConstantScoreQuery>- <RangeFilter fieldName="salary" >- <xsl:attribute name="lowerTerm">- <xsl:value-of select='format-number( substring-before(salaryRange,"-"), "000" )' />- </xsl:attribute>- <xsl:attribute name="upperTerm">- <xsl:value-of select='format-number( substring-after(salaryRange,"-"), "000" )' />- </xsl:attribute>- </RangeFilter>- </ConstantScoreQuery>- </Clause>- </xsl:if>+ <!-- Clause if user selects a preference for type of job - apply choice of+ permanent/contract filter and cache -->+ <xsl:if test="type">+ <Clause occurs="must">+ <ConstantScoreQuery>+ <CachedFilter>+ <TermsFilter fieldName="type"><xsl:value-of select="type"/></TermsFilter>+ </CachedFilter>+ </ConstantScoreQuery>+ </Clause>+ </xsl:if>++ <!-- Use standard Lucene query parser for any job description input -->+ <xsl:if test="description">+ <Clause occurs="must">+ <UserQuery fieldName="description"><xsl:value-of select="description"/></UserQuery>+ </Clause>+ </xsl:if>++ <!-- If any of the location fields are set OR them ALL in a Boolean filter and cache individual filters -->+ <xsl:if test="South|North|East|West">+ <Clause occurs="must">+ <ConstantScoreQuery>+ <BooleanFilter>+ <xsl:for-each select="South|North|East|West">+ <Clause occurs="should">+ <CachedFilter>+ <TermsFilter fieldName="location"><xsl:value-of select="name()"/></TermsFilter>+ </CachedFilter>+ </Clause>+ </xsl:for-each>+ </BooleanFilter>+ </ConstantScoreQuery>+ </Clause>+ </xsl:if>++ <!-- Use XSL functions to split and zero pad salary range value -->+ <xsl:if test="salaryRange">+ <Clause occurs="must">+ <ConstantScoreQuery>+ <RangeFilter fieldName="salary" >+ <xsl:attribute name="lowerTerm">+ <xsl:value-of select='format-number( substring-before(salaryRange,"-"), "000" )' />+ </xsl:attribute>+ <xsl:attribute name="upperTerm">+ <xsl:value-of select='format-number( substring-after(salaryRange,"-"), "000" )' />+ </xsl:attribute>+ </RangeFilter>+ </ConstantScoreQuery>+ </Clause>+ </xsl:if></BooleanQuery></xsl:template></xsl:stylesheet>\ No newline at end of filediff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/albumBooleanQuery.xsl b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/albumBooleanQuery.xslindex 9747952fcf7..d420776f8e4 100644--- a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/albumBooleanQuery.xsl+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/albumBooleanQuery.xsl@@ -18,29 +18,29 @@<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/Document"><!--This template ANDs all fields together. Within a single field all terms are ORed.- The query fields are fed directly through an analyzer and so do not need to adhere to- traditional Lucene query syntax.- -->+ The query fields are fed directly through an analyzer and so do not need to adhere to+ traditional Lucene query syntax.+ --><BooleanQuery>- <xsl:if test="count(artist)>0">- <Clause occurs="must">- <TermsQuery fieldName="artist"><xsl:value-of select="artist"/></TermsQuery>- </Clause>+ <xsl:if test="count(artist)>0">+ <Clause occurs="must">+ <TermsQuery fieldName="artist"><xsl:value-of select="artist"/></TermsQuery>+ </Clause></xsl:if>- <xsl:if test="count(album)>0">- <Clause occurs="must">- <TermsQuery fieldName="album"><xsl:value-of select="album"/></TermsQuery>- </Clause>+ <xsl:if test="count(album)>0">+ <Clause occurs="must">+ <TermsQuery fieldName="album"><xsl:value-of select="album"/></TermsQuery>+ </Clause></xsl:if>- <xsl:if test="count(genre)>0">- <Clause occurs="must">- <TermsQuery fieldName="genre"><xsl:value-of select="genre"/></TermsQuery>- </Clause>+ <xsl:if test="count(genre)>0">+ <Clause occurs="must">+ <TermsQuery fieldName="genre"><xsl:value-of select="genre"/></TermsQuery>+ </Clause></xsl:if>- <xsl:if test="count(releaseDate)>0">- <Clause occurs="must">- <TermsQuery fieldName="releaseDate"><xsl:value-of select="releaseDate"/></TermsQuery>- </Clause>+ <xsl:if test="count(releaseDate)>0">+ <Clause occurs="must">+ <TermsQuery fieldName="releaseDate"><xsl:value-of select="releaseDate"/></TermsQuery>+ </Clause></xsl:if></BooleanQuery>diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/albumFilteredQuery.xsl b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/albumFilteredQuery.xslindex d3f88991edb..b1369f5f0bf 100644--- a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/albumFilteredQuery.xsl+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/albumFilteredQuery.xsl@@ -18,30 +18,30 @@<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/Document"><!-- This template uses an efficient, cached filter for the "genre" field".- Other query fields are fed directly through an analyzer and so do not need to adhere to- traditional Lucene query syntax. Terms within a field are ORed while different fields are ANDed- -->- <BooleanQuery>- <xsl:if test="count(artist)>0">- <Clause occurs="must">- <TermsQuery fieldName="artist"><xsl:value-of select="artist"/></TermsQuery>- </Clause>- </xsl:if>- <xsl:if test="count(album)>0">- <Clause occurs="must">- <TermsQuery fieldName="album"><xsl:value-of select="album"/></TermsQuery>- </Clause>- </xsl:if>- <xsl:if test="count(releaseDate)>0">- <Clause occurs="must">- <TermsQuery fieldName="releaseDate"><xsl:value-of select="releaseDate"/></TermsQuery>- </Clause>- </xsl:if>- <Clause occurs="filter">- <TermsQuery fieldName="genre">- <xsl:value-of select="genre"/>- </TermsQuery>- </Clause>- </BooleanQuery>+ Other query fields are fed directly through an analyzer and so do not need to adhere to+ traditional Lucene query syntax. Terms within a field are ORed while different fields are ANDed+ -->+ <BooleanQuery>+ <xsl:if test="count(artist)>0">+ <Clause occurs="must">+ <TermsQuery fieldName="artist"><xsl:value-of select="artist"/></TermsQuery>+ </Clause>+ </xsl:if>+ <xsl:if test="count(album)>0">+ <Clause occurs="must">+ <TermsQuery fieldName="album"><xsl:value-of select="album"/></TermsQuery>+ </Clause>+ </xsl:if>+ <xsl:if test="count(releaseDate)>0">+ <Clause occurs="must">+ <TermsQuery fieldName="releaseDate"><xsl:value-of select="releaseDate"/></TermsQuery>+ </Clause>+ </xsl:if>+ <Clause occurs="filter">+ <TermsQuery fieldName="genre">+ <xsl:value-of select="genre"/>+ </TermsQuery>+ </Clause>+ </BooleanQuery></xsl:template></xsl:stylesheet>diff --git a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/albumLuceneClassicQuery.xsl b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/albumLuceneClassicQuery.xslindex 65fe1a8004d..e673a7910af 100644--- a/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/albumLuceneClassicQuery.xsl+++ b/lucene/queryparser/src/test/org/apache/lucene/queryparser/xml/albumLuceneClassicQuery.xsl@@ -18,11 +18,11 @@<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/Document"><!-- This template is designed to work with a google-like search form - one edit box and- uses the traditional Lucene query syntax- -->+ uses the traditional Lucene query syntax+ --><BooleanQuery><Clause occurs="must">- <UserQuery><xsl:value-of select="queryString"/></UserQuery>+ <UserQuery><xsl:value-of select="queryString"/></UserQuery></Clause></BooleanQuery></xsl:template>diff --git a/lucene/site/xsl/index.xsl b/lucene/site/xsl/index.xslindex 4b37e8b65cf..db424bb07a4 100644--- a/lucene/site/xsl/index.xsl+++ b/lucene/site/xsl/index.xsl@@ -88,8 +88,8 @@<xsl:call-template name="modules"/></body></html>- </xsl:template>-+ </xsl:template>+<xsl:template name="modules"><ul><xsl:for-each select="str:split($buildfiles,'|')">diff --git a/solr/example/example-DIH/solr/db/conf/xslt/example_rss.xsl b/solr/example/example-DIH/solr/db/conf/xslt/example_rss.xslindex 2857f11748d..c8ab5bfb1ec 100644--- a/solr/example/example-DIH/solr/db/conf/xslt/example_rss.xsl+++ b/solr/example/example-DIH/solr/db/conf/xslt/example_rss.xsl@@ -32,7 +32,7 @@<xsl:template match='/'><rss version="2.0"><channel>- <title>Example Solr RSS 2.0 Feed</title>+ <title>Example Solr RSS 2.0 Feed</title><link>http://localhost:8983/solr</link><description>This has been formatted by the sample "example_rss.xsl" transform -diff --git a/solr/example/example-DIH/solr/db/conf/xslt/updateXml.xsl b/solr/example/example-DIH/solr/db/conf/xslt/updateXml.xslindex daf1344b0d2..7c4a48e7377 100644--- a/solr/example/example-DIH/solr/db/conf/xslt/updateXml.xsl+++ b/solr/example/example-DIH/solr/db/conf/xslt/updateXml.xsl@@ -49,10 +49,10 @@<xsl:variable name="fn" select="@name"/><xsl:for-each select="*">- <xsl:element name="field">- <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>- <xsl:value-of select="."/>- </xsl:element>+ <xsl:element name="field">+ <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>+ <xsl:value-of select="."/>+ </xsl:element></xsl:for-each></xsl:template>@@ -60,10 +60,10 @@<xsl:template match="doc/*"><xsl:variable name="fn" select="@name"/>- <xsl:element name="field">- <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>+ <xsl:element name="field">+ <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute><xsl:value-of select="."/>- </xsl:element>+ </xsl:element></xsl:template><xsl:template match="*"/>diff --git a/solr/example/example-DIH/solr/mail/conf/xslt/example_rss.xsl b/solr/example/example-DIH/solr/mail/conf/xslt/example_rss.xslindex 2857f11748d..c8ab5bfb1ec 100644--- a/solr/example/example-DIH/solr/mail/conf/xslt/example_rss.xsl+++ b/solr/example/example-DIH/solr/mail/conf/xslt/example_rss.xsl@@ -32,7 +32,7 @@<xsl:template match='/'><rss version="2.0"><channel>- <title>Example Solr RSS 2.0 Feed</title>+ <title>Example Solr RSS 2.0 Feed</title><link>http://localhost:8983/solr</link><description>This has been formatted by the sample "example_rss.xsl" transform -diff --git a/solr/example/example-DIH/solr/mail/conf/xslt/updateXml.xsl b/solr/example/example-DIH/solr/mail/conf/xslt/updateXml.xslindex daf1344b0d2..a96e1d02448 100644--- a/solr/example/example-DIH/solr/mail/conf/xslt/updateXml.xsl+++ b/solr/example/example-DIH/solr/mail/conf/xslt/updateXml.xsl@@ -49,10 +49,10 @@<xsl:variable name="fn" select="@name"/><xsl:for-each select="*">- <xsl:element name="field">- <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>- <xsl:value-of select="."/>- </xsl:element>+ <xsl:element name="field">+ <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>+ <xsl:value-of select="."/>+ </xsl:element></xsl:for-each></xsl:template>@@ -60,10 +60,10 @@<xsl:template match="doc/*"><xsl:variable name="fn" select="@name"/>- <xsl:element name="field">- <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>+ <xsl:element name="field">+ <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute><xsl:value-of select="."/>- </xsl:element>+ </xsl:element></xsl:template><xsl:template match="*"/>diff --git a/solr/example/example-DIH/solr/rss/conf/xslt/example_rss.xsl b/solr/example/example-DIH/solr/rss/conf/xslt/example_rss.xslindex 2857f11748d..c8ab5bfb1ec 100644--- a/solr/example/example-DIH/solr/rss/conf/xslt/example_rss.xsl+++ b/solr/example/example-DIH/solr/rss/conf/xslt/example_rss.xsl@@ -32,7 +32,7 @@<xsl:template match='/'><rss version="2.0"><channel>- <title>Example Solr RSS 2.0 Feed</title>+ <title>Example Solr RSS 2.0 Feed</title><link>http://localhost:8983/solr</link><description>This has been formatted by the sample "example_rss.xsl" transform -diff --git a/solr/example/example-DIH/solr/rss/conf/xslt/updateXml.xsl b/solr/example/example-DIH/solr/rss/conf/xslt/updateXml.xslindex daf1344b0d2..a96e1d02448 100644--- a/solr/example/example-DIH/solr/rss/conf/xslt/updateXml.xsl+++ b/solr/example/example-DIH/solr/rss/conf/xslt/updateXml.xsl@@ -49,10 +49,10 @@<xsl:variable name="fn" select="@name"/><xsl:for-each select="*">- <xsl:element name="field">- <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>- <xsl:value-of select="."/>- </xsl:element>+ <xsl:element name="field">+ <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>+ <xsl:value-of select="."/>+ </xsl:element></xsl:for-each></xsl:template>@@ -60,10 +60,10 @@<xsl:template match="doc/*"><xsl:variable name="fn" select="@name"/>- <xsl:element name="field">- <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>+ <xsl:element name="field">+ <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute><xsl:value-of select="."/>- </xsl:element>+ </xsl:element></xsl:template><xsl:template match="*"/>diff --git a/solr/example/example-DIH/solr/solr/conf/xslt/example_rss.xsl b/solr/example/example-DIH/solr/solr/conf/xslt/example_rss.xslindex 2857f11748d..c8ab5bfb1ec 100644--- a/solr/example/example-DIH/solr/solr/conf/xslt/example_rss.xsl+++ b/solr/example/example-DIH/solr/solr/conf/xslt/example_rss.xsl@@ -32,7 +32,7 @@<xsl:template match='/'><rss version="2.0"><channel>- <title>Example Solr RSS 2.0 Feed</title>+ <title>Example Solr RSS 2.0 Feed</title><link>http://localhost:8983/solr</link><description>This has been formatted by the sample "example_rss.xsl" transform -diff --git a/solr/example/example-DIH/solr/solr/conf/xslt/updateXml.xsl b/solr/example/example-DIH/solr/solr/conf/xslt/updateXml.xslindex daf1344b0d2..a96e1d02448 100644--- a/solr/example/example-DIH/solr/solr/conf/xslt/updateXml.xsl+++ b/solr/example/example-DIH/solr/solr/conf/xslt/updateXml.xsl@@ -49,10 +49,10 @@<xsl:variable name="fn" select="@name"/><xsl:for-each select="*">- <xsl:element name="field">- <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>- <xsl:value-of select="."/>- </xsl:element>+ <xsl:element name="field">+ <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>+ <xsl:value-of select="."/>+ </xsl:element></xsl:for-each></xsl:template>@@ -60,10 +60,10 @@<xsl:template match="doc/*"><xsl:variable name="fn" select="@name"/>- <xsl:element name="field">- <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>+ <xsl:element name="field">+ <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute><xsl:value-of select="."/>- </xsl:element>+ </xsl:element></xsl:template><xsl:template match="*"/>diff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example_rss.xsl b/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example_rss.xslindex 2857f11748d..c8ab5bfb1ec 100644--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example_rss.xsl+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/example_rss.xsl@@ -32,7 +32,7 @@<xsl:template match='/'><rss version="2.0"><channel>- <title>Example Solr RSS 2.0 Feed</title>+ <title>Example Solr RSS 2.0 Feed</title><link>http://localhost:8983/solr</link><description>This has been formatted by the sample "example_rss.xsl" transform -diff --git a/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/updateXml.xsl b/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/updateXml.xslindex daf1344b0d2..a96e1d02448 100644--- a/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/updateXml.xsl+++ b/solr/server/solr/configsets/sample_techproducts_configs/conf/xslt/updateXml.xsl@@ -49,10 +49,10 @@<xsl:variable name="fn" select="@name"/><xsl:for-each select="*">- <xsl:element name="field">- <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>- <xsl:value-of select="."/>- </xsl:element>+ <xsl:element name="field">+ <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>+ <xsl:value-of select="."/>+ </xsl:element></xsl:for-each></xsl:template>@@ -60,10 +60,10 @@<xsl:template match="doc/*"><xsl:variable name="fn" select="@name"/>- <xsl:element name="field">- <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute>+ <xsl:element name="field">+ <xsl:attribute name="name"><xsl:value-of select="$fn"/></xsl:attribute><xsl:value-of select="."/>- </xsl:element>+ </xsl:element></xsl:template><xsl:template match="*"/>diff --git a/solr/site/index.xsl b/solr/site/index.xslindex 04e58b307c7..b75fb9c582c 100644--- a/solr/site/index.xsl+++ b/solr/site/index.xsl@@ -81,8 +81,8 @@<xsl:call-template name="modules"/></body></html>- </xsl:template>-+ </xsl:template>+<xsl:template name="modules"><ul><xsl:for-each select="str:split($buildfiles,'|')">