Connecting Tech Pros Worldwide Help | Site Map

Using Docbook with Xml-Control

Otmar Ganahl
Guest
 
Posts: n/a
#1: Nov 11 '05
Hi!
In my application I transform a docbook file to a html
view using the webcontrol "Xml" (with a xsl).It works
fine, except the using of the tag "fileref" in the
docbook-file will cause an exception:

_ctl1_DesktopThreePanes1_ThreePanes__ctl3_xml1: Failed!
Object reference not set to an instance of an object.

(The IE6.0 xml-parser transform the docbook file
correctly)

Any ideas?

Thanks,
Otmar
Oleg Tkachenko
Guest
 
Posts: n/a
#2: Nov 11 '05

re: Using Docbook with Xml-Control


Otmar Ganahl wrote:
[color=blue]
> In my application I transform a docbook file to a html
> view using the webcontrol "Xml" (with a xsl).It works
> fine, except the using of the tag "fileref" in the
> docbook-file will cause an exception:
>
> _ctl1_DesktopThreePanes1_ThreePanes__ctl3_xml1: Failed!
> Object reference not set to an instance of an object.
>
> (The IE6.0 xml-parser transform the docbook file
> correctly)[/color]

There are couple of nasty bugs in .NET XSLT implementation, which
prevent Docbook XSLT stylesheets executing. Search in archives, we
discussed that earlier. There are some small fixes in stylesheets to be
done to get it working.
--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

MSFT
Guest
 
Posts: n/a
#3: Nov 11 '05

re: Using Docbook with Xml-Control


Hi Otmar,

Can you post more detail information here, for example the XML and xsl
file, and the .NET code you used.

Thanks,

Luke

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026?? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
http://www.microsoft.com/security/se...s/ms03-026.asp and/or to
visit Windows Update at http://windowsupdate.microsoft.com to install the
patch. Running the SCAN program from the Windows Update site will help to
insure you are current with all security patches, not just MS03-026."


Oleg Tkachenko
Guest
 
Posts: n/a
#4: Nov 11 '05

re: Using Docbook with Xml-Control


台灣微軟技術處支援部 wrote:
[color=blue]
> Thank you for the information, It is indeed a issue. However, Otmar
> mentioned the problem is related to tag "fileref". It may be different
> issue. [/color]

Well, may be. I would be great if Otmar provide full exception trace or his
docbook document to allwo us to reproduce the problem.
But running small test with dummy docubook document with fileref attribute I'm
still getting the same $nodeset[1] + 1 related problem:

<!DOCTYPE article SYSTEM "D:\docbook\docbookx.dtd">
<?xml-stylesheet type="text/xsl"
href="D:\docbook\docbook-xsl-1.48\html\docbook.xsl"?>
<article>
<para>
<mediaobject>
<imageobject>
<imagedata fileref="d:\fop.jpg"/>
</imageobject>
</mediaobject>
</para>
</article>

Running under .NET:
System.Xml.Xsl.XsltCompileException:
file:///D:/docbook/docbook-xsl-1.48/html/docbook.xsl(27,2) :
---> System.Xml.Xsl.XsltCompileException:
file:///D:/docbook/docbook-xsl-1.48/common/common.xsl(1305,10) :
---> System.Xml.Xsl.XsltException: '$years[1] + 1' is an invalid XPath
expression. ---> System.Xml.XPath.XPathException: XsltContext is needed for
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 opnd1, IQuery opnd2)
at System.Xml.XPath.QueryBuilder.ProcessOperator(Oper ator root, IQuery
qyInput, Boolean& cache, Boolean& position)
at System.Xml.XPath.QueryBuilder.ProcessNode(AstNode root, IQuery qyInput,
Int32 parent, AxisType parentaxis, Boolean& cache, Boolean& position)
at System.Xml.XPath.QueryBuilder.Build(AstNode root, String query)
at System.Xml.Xsl.Compiler.AddQuery(String xpathQuery, Boolean allowVar,
Boolean allowKey)

--
Oleg Tkachenko
http://www.tkachenko.com/blog
Multiconn Technologies, Israel

Closed Thread