473,386 Members | 1,705 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

problem with document() function of XSLT

Hi everyone,

Microsoft states that the System.XML 1.0 included in framework 1.1
supports the W3C XSLT Specification. However, I am having a problem
using the document() fuction specified in
http://www.w3.org/TR/xslt (chapter 12.1). When using "<xsl:variable
name="test" select="document('Resources.xml')/root/test"/>" the
variable test is always empty. However when debugging this select in
the Stylus studio, the variable is correctly filled. Did any of you
have similar problem ? Did anyone have a solution to this problem ?

Any help would be greatly appreciated.

Michal

Sep 10 '06 #1
4 1601
the Resources.XML looks like this:

<root>
<test>blabla</test>
</root>

Sep 10 '06 #2
I have solved the issue myself. Thanks anyway. When anyone is
interested in how did I solve it, post the message here.

Michal

Sep 10 '06 #3


Michal wrote:
Microsoft states that the System.XML 1.0 included in framework 1.1
supports the W3C XSLT Specification. However, I am having a problem
using the document() fuction specified in
http://www.w3.org/TR/xslt (chapter 12.1). When using "<xsl:variable
name="test" select="document('Resources.xml')/root/test"/>" the
variable test is always empty. However when debugging this select in
the Stylus studio, the variable is correctly filled. Did any of you
have similar problem ? Did anyone have a solution to this problem ?
Yes, the XSLT document function is supported but you need to make sure
the XSLT transformation is run the right way to enable it, see e.g.
<http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemXmlXslXslTransformClassTransformTopic16 .asp>
about passing in a none null XmlResolver so that the document function
is executed.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Sep 10 '06 #4
Thank you for your reply. That is exactly how I have solved it (with
XMLResolver).

Sep 10 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: loveNUNO | last post by:
Hi ~ Plz Help me ~~ My problem is.. XBRL Sample file ------------------ a.xbrl <?xml version="1.0" encoding="utf-8"?>
4
by: Trygve | last post by:
I'm trying to convert a XML-document using XSLT. Depending on the source file (the XML-document) the conversion is either correct or incorrect. If the first tag in the document contains an non...
0
by: Mike | last post by:
I'm generating an XSLT document programatically in VB.Net. I'm then trying to apply that XSLT against a cXML document to generate my own internally developed XML document. I'm using RichTextBox...
0
by: Martin Dugeorge | last post by:
Hello all, i've got an XSLT stylesheet containing a XSLT document function with an absolute URI : <xsl:for-each select="document('http://x.y.z/dir/a.xml')/root/element">...</xsl:for-each> ...
4
by: Cathie | last post by:
Hi All, I am trying to get my style sheet to work. It works fine in IE but I can't get it to work in .net. Below is the function I use for transforming, where advancedOptionsFile is the path...
17
by: rox.scott | last post by:
Can someone please explain why this happens? The expected output is 3, but uncommenting line 7 makes the output 0. Why ??? VB.NET code: ** note the commented line, this is the culprit ** Dim...
4
by: dar_imiro | last post by:
Hi, I'm trying to get rid of frames as menu holder in my html-page. I'd also like to separate the menu structure to xml and xslt. Also the actual content is divided to xml and its corresponding...
2
by: jkflens | last post by:
Hello, i convert one XML-document by using XSLT into another XML-document. First change all attributes to elements is no problem. Then i try to insert a new element into the new document by...
6
by: Christoph | last post by:
I'm trying to come up with a stylesheet where, when the rows are displayed, duplicate game names are not shown on subsequent rows. It works but doesn't work properly. If I sort the data using...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.