Click here to Skip to main content
15,892,480 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: Loading dll and resources from wrong folder Pin
Alan N21-Jan-13 2:33
Alan N21-Jan-13 2:33 
GeneralRe: Loading dll and resources from wrong folder Pin
marca29221-Jan-13 3:47
marca29221-Jan-13 3:47 
AnswerRe: Loading dll and resources from wrong folder Pin
Alan N21-Jan-13 5:12
Alan N21-Jan-13 5:12 
GeneralRe: Loading dll and resources from wrong folder Pin
Eddy Vluggen21-Jan-13 5:29
professionalEddy Vluggen21-Jan-13 5:29 
GeneralRe: Loading dll and resources from wrong folder Pin
marca29221-Jan-13 21:30
marca29221-Jan-13 21:30 
QuestionSystem.Runtime.InteropServices.COMException Pin
AnneThorne20-Jan-13 13:43
AnneThorne20-Jan-13 13:43 
AnswerRe: System.Runtime.InteropServices.COMException Pin
AnneThorne20-Jan-13 17:38
AnneThorne20-Jan-13 17:38 
QuestionMS XSLT .NET Extension Function NameSpaces Pin
dshcs20-Jan-13 2:06
dshcs20-Jan-13 2:06 
I am developing a dynamic XPATH function for a MS XSLT transform. I am running the transform under a VB.NET (4.5) wrapper:

XML
Public Function evaluate1(Context As XPathNodeIterator, Expression As String) As XPathNodeIterator
  Context.MoveNext()
  Dim nsXmlNamespaceManager As XmlNamespaceManager
  nsXmlNamespaceManager = New XmlNamespaceManager(Context.Current.NameTable)
  Return Context.Current.Select(Expression, nsXmlNamespaceManager)
End Function


The document to transform is XHTML with:

XML
<!DOCTYPE html SYSTEM "file:C:/..path../parse1.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">


The XSLT document has:

XML
<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:msxsl="urn:schemas-microsoft-com:xslt"
  xmlns:vb="urn:vb-script:xslt"
  xmlns:http="http://www.w3.org/1999/xhtml"


I can successfully use XPATHs with the http namespace from the XSLT, but not in the function code's Select method.

Within the XSLT, the function is used as

XML
<xsl:value-of select="name(vb:evaluate(., '/http:html[1]'))"/>


The function works with unqualified elements (no http: ), but if the namespace is used the "Namespace prefix 'http' is not defined." error is caught. I listed the contents of nsXmlNamespaceManager and see

xmlns=http://www.w3.org/2000/xmlns/
xml=http://www.w3.org/XML/1998/namespace

I know I should be able to add a namespace to the nsXmlNamespaceManager, but that would not be a general solution. It would seem logical to find the @xmlns:* attributes on the XSLT and add those to nsXmlNamespaceManager (assuming I could pass a reference to some XSLT object that would allow me to navigate to the xsl:stylesheet node (or pass a nodeset of those attributes to the function)).

Anyway, the search results on this subject are getting a little thin and I wanted to know if anyone had ventured down this path before and what they did?
AnswerRe: MS XSLT .NET Extension Function NameSpaces Pin
dshcs21-Jan-13 9:48
dshcs21-Jan-13 9:48 
QuestionInconsistent Test Results Pin
AnalogNerd18-Jan-13 5:21
AnalogNerd18-Jan-13 5:21 
AnswerRe: Inconsistent Test Results Pin
AnalogNerd18-Jan-13 5:55
AnalogNerd18-Jan-13 5:55 
QuestionHow can I learn about under the hood of .NET? Pin
atoi_powered16-Jan-13 22:40
atoi_powered16-Jan-13 22:40 
AnswerRe: How can I learn about under the hood of .NET? Pin
Pete O'Hanlon16-Jan-13 23:08
mvePete O'Hanlon16-Jan-13 23:08 
GeneralRe: How can I learn about under the hood of .NET? Pin
atoi_powered17-Jan-13 0:55
atoi_powered17-Jan-13 0:55 
GeneralRe: How can I learn about under the hood of .NET? Pin
Pete O'Hanlon17-Jan-13 1:02
mvePete O'Hanlon17-Jan-13 1:02 
AnswerRe: How can I learn about under the hood of .NET? Pin
savbace16-Jan-13 23:58
savbace16-Jan-13 23:58 
GeneralRe: How can I learn about under the hood of .NET? Pin
atoi_powered17-Jan-13 0:58
atoi_powered17-Jan-13 0:58 
AnswerRe: How can I learn about under the hood of .NET? Pin
Jonathan C Dickinson17-Jan-13 3:16
Jonathan C Dickinson17-Jan-13 3:16 
GeneralRe: How can I learn about under the hood of .NET? Pin
atoi_powered17-Jan-13 13:05
atoi_powered17-Jan-13 13:05 
AnswerRe: How can I learn about under the hood of .NET? Pin
Abhinav S17-Jan-13 17:12
Abhinav S17-Jan-13 17:12 
AnswerRe: How can I learn about under the hood of .NET? Pin
Rahul Rajat Singh21-Jan-13 1:09
professionalRahul Rajat Singh21-Jan-13 1:09 
AnswerRe: How can I learn about under the hood of .NET? Pin
Eddy Vluggen21-Jan-13 13:39
professionalEddy Vluggen21-Jan-13 13:39 
Questiona question about how .NET apps dealing with filesystem failing Pin
alexyxj15-Jan-13 22:07
alexyxj15-Jan-13 22:07 
AnswerRe: a question about how .NET apps dealing with filesystem failing Pin
Richard MacCutchan15-Jan-13 22:40
mveRichard MacCutchan15-Jan-13 22:40 
GeneralRe: a question about how .NET apps dealing with filesystem failing Pin
alexyxj15-Jan-13 22:49
alexyxj15-Jan-13 22:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.