XmlResolver and xsl:include

Have been doing a fair amount of reading but at this point no joy. The 
scenario is

- XSL template is stored within db.  
- Template has a xsl:include statement as <xsl:include 
href="inc.template.methods.xsl"/>

I now I have to pass a resolver when I use the load method so that it 
understands the xsl include as in:

' object template is custom class to retrieve templates from the db
dim template as new objTemplate
dim myresolver as xmlresolver
dim mytransfrom as xmltransform

' template.xmlDocRunTime returns a xmldocument object
mytransform.load(template.xmlDocRunTime, myresolver,nothing)

So the question is how do I tell the transform via the resolver that the 
file inc.template.methods.xsl can be found at a specific location within the 
web site.

Cheers
Keith
0
10/4/2005 3:11:16 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
1014 Views

Similar Articles

[PageSpeed] 38


Keith Chadwick wrote:


> ' object template is custom class to retrieve templates from the db
> dim template as new objTemplate
> dim myresolver as xmlresolver
> dim mytransfrom as xmltransform
> 
> ' template.xmlDocRunTime returns a xmldocument object
> mytransform.load(template.xmlDocRunTime, myresolver,nothing)
> 
> So the question is how do I tell the transform via the resolver that the 
> file inc.template.methods.xsl can be found at a specific location within the 
> web site.

You need to implement your own custom resolver for instance by extending 
XmlUrlResolver where you implement ResolveUri as needed for your case.


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
10/4/2005 4:48:57 PM
Reply:

Similar Artilces:

xmlresolver
Hi, I have the following code and the compiler complains with "method obsolete should pass a xmlResolver to transform method" line 12. 1 private void Page_Load(object sender, System.EventArgs e) 2 { 3 string strmenuPath = Request.PhysicalApplicationPath; 4 XPathDocument oDoc = new XPathDocument(strmenuPath + "\\" + strmenuXml); 5 6 //Create a new transform 7 XslTransform oTrans = new XslTransform(); 8 oTrans.Load(strmenuPath + "\\" + strmenuXsl); 9 // Create the Stream to place the output. 10 System.IO.Stream str = new System.IO.MemoryStream(); 11 ...

macro to include "user select"
Col A is sequential mumber list 1 - 90. (61 currently used - allowed 90 for "expansion"). Col B is a list of names, with associated data in 7 cols C - I (truncated layout below). Col B1:B90 is rangenamed "names" (for function F5 "goto" purpose) I want to macro "delete" function (to user-select any one of the 90 names), CLEAR the cells B - I in that row, then "data/sort" the entire range to remove the blank. Got most of it by "recording" but came unstuck with the "user select". A B C D E F G H I 1 ale...

XmlResolver.Credentials
I have this code from an example on the MSDN site: Dim rdr As New XmlTextReader("http://localhost/bookstore/book.xml") rdr.XmlResolver.Credentials = CredentialCache.DefaultCredentials Dim doc As New XmlDocument doc.Load(rdr) However, I get an error under rdr.XmlResolver, saying that it is Write Only. I have imported the appropriate namespaces (Net, Xml, Xml.Schema), yet it says the code isn't valid. I also had similar problems using XmlValidatingReader.XmlResolver.Credentials (complaining that it is Write-only). Does anyone know why? cashdeskma...

Add cells including text
Hi, I have a row of cells. as below: Hol 8.00 9.75 9.00 Hol 8.00 10 9.25 9.00 8.25 I want to add the numerical elements in this row, but the text parts are causing an error. Is there a forumula that will only add the numerical parts, without resorting to nested IF statements saying IF(cell="Hol") etc etc? Thanks in advance -- HappyTrucker ------------------------------------------------------------------------ HappyTrucker's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=25997 View this thread: http://www.excelforum.com/showthread.php?threadid=395...

What does 'You should pass XmlResolver to Transform() method' mean???
I've got the following code. But the XSLTransform line is underlined by the blue squiggle and vs tells me c:\inetpub\wwwroot\Sites\RiderDesign\articles\test.aspx.vb(37): 'Public Sub Transform(input As System.Xml.XPath.IXPathNavigable, args As System.Xml.Xsl.XsltArgumentList, output As System.IO.Stream)' is obsolete: 'You should pass XmlResolver to Transform() method' What the heck does this mean? Thanks... Dim XMLDoc As New XmlDocument XMLDoc.Load(Server.MapPath("files/since1968_interview_zeldman.xml")) Dim XSLTrans As New Xsl.XslTransform XSLTrans.Load(Server.M...

#includes
I'm looking over my files this evening, and I'm noticing that some of my #includes (of my own header files) are in my .h files, while some are in my ..cpp files. Sometimes I have used incomplete class declarations as well. I have tried to find some good reading to help me understand this whole thing, but haven't so far. Could I get a bit of advice on this? I don't know if this is related, but one of my source files won't give me any of those "smart tips" when the cursor passes over various objects, unless it is something that I have declared in that file itsel...

Including MDA information in transaction edit reports
GP 8.0 I would like to include MDA entry with the AP transaction edit list so the input can be reviewed before releasing a batch for posting. Same thing applies to our invoicing. What is the best way to accomplish this task? I have coded this once for a customer. The only method that can work seamlessly is a Dexterity customisation which uses a trigger to add extra lines into the temporary table used for the report just prior to printing. David Musgrave [MSFT] Senior Development Consultant Escalation Engineer - Great Plains Microsoft Dynamics Support - Asia Pacific Microsoft Dynamics (f...

Loss of XPath Navigation in DOM after XSL in C#
Hi I am using C# and performing an XSL translation on a DOM like so XslTransform oXSL = new XslTransform(); oXSL.Load(Filename); oXMLOut=new XmlDocument() oXMLOut.Load(oXSL.Transform(oXMLIn,null)) where oXMLIn is an input parameter All seems well. The translation works and looking at oXMLOut.InnerXml I have what I want The problem is that I cannot navigate this new DOM using XPath. Is there some property of this new DOM that I must set? This has not been required where I have used XPath previosuly but this is the only time I want to use XPath on a new DOM resulting from XslTransform Did ...

In Access, How do I hide records, but include them in the total
I'm running a report where I have work orders. They are grouped by appr and comp. I need to create a report that will show all the appr tickets, but give me a total count of appr and comp. I have the report generated the way I want, with total count, but how do i hide just the comp tickets. xeoimom wrote: >I'm running a report where I have work orders. They are grouped by appr and >comp. I need to create a report that will show all the appr tickets, but >give me a total count of appr and comp. I have the report generated the way >I want, with total count, but ...

XmlResolver and xsl:include
Have been doing a fair amount of reading but at this point no joy. The scenario is - XSL template is stored within db. - Template has a xsl:include statement as <xsl:include href="inc.template.methods.xsl"/> I now I have to pass a resolver when I use the load method so that it understands the xsl include as in: ' object template is custom class to retrieve templates from the db dim template as new objTemplate dim myresolver as xmlresolver dim mytransfrom as xmltransform ' template.xmlDocRunTime returns a xmldocument object mytransform.load(template.xmlDocRunTim...

Having a cell with '<' sign included within a function?
If there is a '<' sign in a cell, can the cell be included in a function? Not when the function expects a numeric value. You could use MID(A30,2,LEN(A30)-1) in place of just A3 which has <5. For example SQRT(MID(A30,2,LEN(A30)-1)) or 2*MID(A30,2,LEN(A30)-1) which is not a function but a formula. best wishes -- Bernard V Liengme www.stfx.ca/people/bliengme remove caps from email "Michelle" <Michelle@discussions.microsoft.com> wrote in message news:46BBCC6F-BB0C-442B-81C9-57775C9F327E@microsoft.com... > If there is a '<' sign in a cell, can the ...

You should pass XmlResolver to Transform() method
Hi, I'm trying to test the vb.net-exercise "How to use a DataSet with the Office XP Chart Component and ASP.NET" on http://support.microsoft.com/kb/303016/en-us Visual Studio rails against the expression: "xslTran.Transform(xmlDoc_ds, Nothing, context.Response.Output)" and comments: "Public Sub Transform(input As System.Xml.XPath.IXPathNavigable, args As System.Xml.Xsl.XsltArgumentList, output As System.IO.TextWriter)" is obsolete: "you should pass XmlResolver to Transform() method" Sorry, but that's an untasted field for me. Please tell m...

include LISTNUM in style definition?
Is there any way to create a styled paragraph that allows you to include a LISTNUM field code inside the style definition to do simple numbering, therefore, avoiding Word 2007's built-in numbering? If so how? No, that isn't possible. However, you can create an AutoText entry (Building Block) that inserts a field. For simple numbering, I'd use a SEQ field. -- Stefan Blom Microsoft Word MVP "cayce" <cayce@discussions.microsoft.com> wrote in message news:CDDB7640-3C7A-4A78-B5B3-F35D5037A78D@microsoft.com... > Is there any way to create a s...

XML >> XSL
Hi All! I'm completly green at using XML/XSL and have a small problem... I have a XML file that is generated by my application. It looks like this: <PLANETS> <PLANET> <NAME>Eartch</PLANET> <INFO> <COLOR>Blue</COLOR> <WEIGHT>168732372</WEIGHT> </INFO> </PLANET> <PLANET> <NAME>Mars</PLANET> <INFO> <COLOR>Red</COLOR> <WEIGHT>75894837857</WEIGHT> </INFO> </PLANET...

X-Axis @ 0 wont work (PIC INCLUDED) #2
I agree however this is what is being asked of me. I tried using th macro on that site and it didn't work. All i was given was the fou mini marcos and not the one main one to involk the others. I trie running these manually and it didnt help eithe -- scrupul0u ----------------------------------------------------------------------- scrupul0us's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1418 View this thread: http://www.excelforum.com/showthread.php?threadid=26496 Even if you can't get the macros to work, the algebra involved here is not too complic...

Is there a way to put html code in title attribute in xsl? thanks!
I need put some html code into title attribute of A tag, so that user could see html when they move mouse over the link, I think this isn't a standard use, but it does work. The problem is how can I prevent the xsl transfer the html when it does the transformation. I would like something like <A title="<b>test</b>"> but I end up with <A title="&lt;b&gt;test&lt;/b&gt;"> Any idea? Thanks! david wrote: > I need put some html code into title attribute of A tag, so that user could > see html when they move mouse over the lin...

List of XSL-stylesheets
Hello group, does anyone have made a list of XSL-stylesheets for a faster lookup when changes are needed? Something like: 1_Update.xsl -> Update Account 2_Update.xsl -> Update Contact 134_Preview.xsl -> Preview task (activity) 136_Preview.xsl -> Preview fax (activity) 137_Preview.xsl -> Preview phone call (activity) 138_Preview.xsl -> Preview Email (activity) 141_Preview.xsl -> Preview letter (activity) 142_Preview.xsl -> Preview appointment (activity) .... Thanks in advance Michael Erl Dear Michael, I did not make such a list, but you can make it yourse...

Stock Count Schedule
This is a multi-part message in MIME format. ------=_NextPart_000_0068_01C9AC8D.3DC38600 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Under Inventory >Stock Count Schedule> Stock Count Mass Add, there is a = check box if you want to include or exclue the zero on hand items. Un-Checking that Box to exclude the ZERO does not work. does any one = know if it is bux or how to fix/resolve this issue Regards, ------=_NextPart_000_0068_01C9AC8D.3DC38600 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encodin...

Budget does not include business income
I am using Money 2007 H&B and new to budget. I have started using Essential Budget and it does not show the income category that are marked 'Business'. How do I bring them in? Regards "Bharathan" <Bharathan@discussions.microsoft.com> wrote in message news:1A4168BE-BB57-475D-B59B-555A7E03FA73@microsoft.com... >I am using Money 2007 H&B and new to budget. I have started using >Essential > Budget and it does not show the income category that are marked > 'Business'. > How do I bring them in? You cannot. Even for only the personal ...

How can I include a workbook name when specifying a Range in VBA code?
How can I include a workbook name when specifying a Range in VBA code? Thanks, Keith Hi Heith, One way: Sub Tester08() Dim WB As Workbook Dim WS As Worksheet Dim Rng As Range Set WB = Workbooks("MyWorkBook") Set WS = WB.Sheets("MysheetName") Set Rng = WS.Range("A1:D100") End Sub --- Regards, Norman "keithb" <k31thb@yahoo.com> wrote in message news:eOP3QaXmFHA.2628@tk2msftngp13.phx.gbl... > How can I include a workbook name when specifying a Range in VBA code? > > Thanks, > > Keith > Hi Keith, Just to add, if...

including external HTML into a signature?
Hi, I'm wanting to create a standard Outlook signature image for all our company's employees, to include below their names/position. And image, and preferably, a hyperlink, that I can change whenever I want on the Web server and the users never have to manually change their signature settings themselves (outside the first time to put in their info and the link.) I know for just the image, all I have to do is have them put some HTML for <img src="http://ourserver.com/image.gif" /> and then I can change and swap out image.gif whenever I want. But what if I w...

XSL question #2
I have an sample xml below. I want to do a distinct on the code node and the programDescription. I want the output to be like in a tree structure. So i would like to have PRG004 >Crazy Training 2> MAT01 PHS101 Any ideas it musn't be in a tree but it could be in a table structure Thanks <?xml version="1.0" standalone="yes"?> <?xml-stylesheet type="text/xsl" href="email.xsl"?> <NewDataSet> <ProgramDetail> <Code>PRG004</Code> <programDescription&g...

outlook.prf file not included in O2KRK?
Everything I'm reading says that a sample outlook.prf file and newprof.exe is included in the Office 2000 Resource Kit. I've searched for these files on two systems with the RK installed and they aren't there. Is there some kind of add-in that I need to download in order to get these tools? Thanks, Dave Did you install the toolkit? It's a separate download online, not sure on purchased copies. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Author, Google and Other Search Engines...

Bug with XMLResolver
Hi I'm currently having a problem with XMLResolvers. To put it simply using the same stylesheet and the same xml I am getting different results. When using the code and style sheet below. I get the following. The first file I create, using the obsolete method, creates the text1.txt file correctly. It creates a file with just a single < in it. The second file created (test2.txt) using the new XMLResolver method creates a file containing the text &lt; I am posotive there is nothing wrong with the xsl file as I have tested it with xmlspy and several other products and they all...

XmlResolver implementation for OASIS XML Catalogs?
Hi, Is there an implementation of System.Xml.XmlResolver for OASIS XML Catalogs (http://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html)? thanks, - Gerben Abbink ...