OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   xpath mess case study: .net (was: Nasty XPath expressions)

[ Lists Home | Date Index | Thread Index ]


> > I won't even start with my success of binding my own variables in the
> > .NET System.Xml classes. Their System.Xml.XPath classes do not even
> > envisage that someone might ever want to do this.. you have to pick out
> > Xsl classes, and then the exceptions start...
> If you don't mind me asking, what problems have you had?

I wrote a little test program at first: I had to subclass
System.Xml.Xsl.XsltContext, and provide my own ResolveVariable function,
which always returns the same variable.

For that purpose, I had to implement my own IXsltContextVariable class,
which returns an XmlNodeList containing one node. And in order to that,
I had to subclass XmlNodeList, because it is an abstract class, so I
cannot instantiate it, and in any case I cannot write into it.

So, I had to write 3 classes already just to set up a variable context.
But then when I call setContext with my own context on some
XPathExpression object, I get a NotSupportedException.. fanstastic :) Of
course, since it was not envisioned as a requirement, this is also not
document anywhere.

Christian Nentwich
p.s. it was just as hard with Xalan, but at least I could look into the
source code there to figure out what was going wrong.





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS