471,073 Members | 1,161 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

Using Docbook with Xml-Control

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
Nov 11 '05 #1
3 2040
Otmar Ganahl wrote:
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)


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

Nov 11 '05 #2
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."
Nov 11 '05 #3
台灣微軟技術處支援部 wrote:
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.


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

Nov 11 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Dr. Laurence Leff | last post: by
2 posts views Thread by Simon Strandgaard | last post: by
2 posts views Thread by Matti J酺vinen | last post: by
1 post views Thread by Daniel Meilleur | last post: by
2 posts views Thread by Yarco | last post: by
6 posts views Thread by BLechmann | last post: by
12 posts views Thread by Jim Anderson | last post: by
2 posts views Thread by Joseph Kesselman | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.