Yes, I received the autoidx bug as well. I forgot to
mention that I changed the docbook stylesheet
number/string handling lines as detailed in:
http://groups.google.com/groups?hl=e...=UTF-8&oe=UTF-
8&threadm=e0HAV4iGDHA.2852%
40tk2msftngp13.phx.gbl&rnum=1&prev=/groups%3Fq%3Ddocbook%
2Basp.net%26hl%3Den%26lr%3D%26ie%3DUTF-8%26oe%3DUTF-8%
26selm%3De0HAV4iGDHA.2852%2540tk2msftngp13.phx.gbl %26rnum%
3D1
with this patch, i no longer get the autoidx bug, just the
bug i originally posted.
[color=blue]
>-----Original Message-----
>Hello!
>
>Unable to reproduce unfortunately. When I run your[/color]
document against docbook[color=blue]
>xslt I got as expected old notorious one:
>
>System.Xml.Xsl.XsltCompileException:
>file:///D:/docbook/docbook-xsl-1.61.3/xhtml/docbook.xsl[/color]
(24,2) :[color=blue]
> ---> System.Xml.Xsl.XsltCompileException:
>file:///D:/docbook/docbook-xsl-1.61.3/common/common.xsl[/color]
(1554,10) :[color=blue]
> ---> System.Xml.Xsl.XsltException: '$years[1] + 1' is[/color]
an invalid XPath[color=blue]
>expression. ---> System.Xml.XPath.XPathException:[/color]
XsltContext is needed for[color=blue]
>this query because of an unknown function.
> at System.Xml.XPath.VariableQuery.ReturnType()
> at System.Xml.XPath.PositionQuery.ReturnType()
> at System.Xml.XPath.FilterQuery.ReturnType()
> at System.Xml.XPath.NumericExpr..ctor(Op op, IQuery[/color]
opnd1, IQuery opnd2)[color=blue]
> at System.Xml.XPath.QueryBuilder.ProcessOperator[/color]
(Operator root, IQuery[color=blue]
>qyInput, Boolean& cache, Boolean& position)
> at System.Xml.XPath.QueryBuilder.ProcessNode(AstNode[/color]
root, IQuery qyInput,[color=blue]
>Int32 parent, AxisType parentaxis, Boolean& cache,[/color]
Boolean& position)[color=blue]
> at System.Xml.XPath.QueryBuilder.Build(AstNode root,[/color]
String query)[color=blue]
> at System.Xml.Xsl.Compiler.AddQuery(String[/color]
xpathQuery, Boolean allowVar,[color=blue]
>Boolean allowKey)
>
>If I modify $years[1] + 1 to number($years[1]) + 1 at[/color]
1554 line of[color=blue]
>common/common.xsl I get another (but similar) exception:
>
>System.Xml.Xsl.XsltCompileException:
>file:///D:/docbook/docbook-xsl-1.61.3/xhtml/docbook.xsl[/color]
(32,2) :[color=blue]
> ---> System.Xml.Xsl.XsltCompileException:
>file:///D:/docbook/docbook-xsl-1.61.3/xhtml/autoidx.xsl[/color]
(36,4) :[color=blue]
> ---> System.NullReferenceException: Object reference[/color]
not set to an instance[color=blue]
>of an object.
> at System.Xml.XPath.FilterQuery.Clone()
> at System.Xml.XPath.FilterQuery.Clone()
> at System.Xml.XPath.MergeFilterQuery.Clone()
> at System.Xml.XPath.OrQuery.Clone()
> at System.Xml.XPath.MethodOperand.Clone()
> at System.Xml.XPath.LogicalExpr.Clone()
> at System.Xml.XPath.BooleanFunctions.Clone()
> at System.Xml.XPath.AndExpr.Clone()
> at System.Xml.XPath.FilterQuery.Clone()
> at System.Xml.XPath.QueryBuilder.ProcessFilter(Filter[/color]
root, Boolean&[color=blue]
>cache, Boolean& position)
>....
>
>That's deeply in autoidx.xsl, which probably nobody but[/color]
Jeni Tennison[color=blue]
>understands, in this crazy XPath expression:
>
><xsl:variable name="terms"
>select="//indexterm[count(.|key('letter',translate[/color]
(substring(normalize-space(concat(primary/@sortas,[color=blue]
>primary[not(@sortas)])), 1, 1),
> 'abcdefghijklmnopqrstuvwxyz',
>
>'ABCDEFGHIJKLMNOPQRSTUVWXYZ'))[count(ancestor::node()[/color]
|$scope) =[color=blue]
>count(ancestor::node())][1]) = 1 and not(@class[/color]
= 'endofrange')]"/>[color=blue]
>
>Hope I'll find a time to debug it further...
>--
>Oleg Tkachenko
>
http://www.tkachenko.com/blog
>Multiconn Technologies, Israel
>
>.
>[/color]