473,699 Members | 2,701 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Very Strang XML problem

Hello i'm using php with xml.

I've an rather big xsl file, that has the following code in it:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:page="htt p://www.wolterinkwe bdesign.com/xml/page"
xmlns:menu="htt p://www.wolterinkwe bdesign.com/xml/menu"
xmlns:role="htt p://www.wolterinkwe bdesign.com/xml/roles">

<xsl:output method="xhtml" indent="yes"/>

<xsl:param name="absolute_ url"/>
<xsl:param name="upload_ur l"/>
<xsl:param name="document_ root"/>
<xsl:param name="role"/>
<xsl:param name="xcd_dir"/>

<xsl:variable name="menu" select="documen t(concat($docum ent_root,
'/menu.xml'))"/>
<xsl:variable name="roles" select="documen t(concat($xcd_d ir,
'/roles.xml'))"/>

<xsl:template match="/page:page">
....
...
[cut]

I then transform an xml file (that xml file is not really interesting)
using this xsl. But when i have this line in the xsl:
<xsl:variable name="roles" select="documen t(concat($xcd_d ir,
'/roles.xml'))"/>

I get the following error[sablatron php]:

XSLT Error:

array(4) {
[0]=>
resource(18) of type (XSLT Processor)
[1]=>
int(3)
[2]=>
int(0)
[3]=>
array(6) {
["msgtype"]=>
string(5) "error"
["code"]=>
string(1) "2"
["module"]=>
string(9) "Sablotron"
["URI"]=>
string(26) "C:/webserver/xcd/roles.xml"
["line"]=>
string(1) "1"
["msg"]=>
string(51) "XML parser error 4: not well-formed (invalid token)"
}
}

So i conclusion: roles.xml is not valid xml. But my browser says it is!

And i cannot find the invalid token. Please Help!!!
roles.xml:

<?xml version="1.0" encoding="ISO-8859-1"?>
<roles xmlns="http://www.wolterinkwe bdesign.com/xml/roles">

<!--
! The admin role.
! And admin should have all permisions to do its task
!
!-->
<role id="admin" isadmin="true">
<name>Administr ator</name>
<description> De Administrator kan alles verwijderen, toevoegen en
bewerken op de site.</description>
<grants>
<for name="all">
<action name="edit" grant="true" />
<action name="new" grant="true" />
<action name="read" grant="true" />
</for>
</grants>
</role>

<!--
! A generic visitor role.
! Anybody who is not given a role explicit is a visitor
!-->
<role id="visitor" isvisitor="true ">
<name>Bezoeke r</name>
<description>Be zoeker van de site</description>
<grants>
<for name="all">
<action name="read" grant="true" />
<action name="edit" grant="true" />
</for>
<for name="gastenboe k">
<action name="new" grant="true"/>
<action name="edit" grant="true" />
</for>
<for name="medewerke rs">
<action name="new" grant="true"/>
</for>
<for name="files">
<action name="new" grant="true"/>
</for>
<for name="news">
<action name="new" grant="true"/>
</for>
</grants>
</role>

</roles>
Jul 20 '05 #1
1 1382
In article <41************ ***********@new s.wanadoo.nl>,
Tjerk Wolterink <tj***@wolterin kwebdesign.com> wrote:
<xsl:variabl e name="roles" select="documen t(concat($xcd_d ir,
'/roles.xml'))"/> string(26) "C:/webserver/xcd/roles.xml"


It appears that you are trying to call the document function with an
argument "C:/webserver/xcd/roles.xml", which is presumably a windows
file name. The argument to the document function should be a URL,
probably something like "file:///C:/webserver/xcd/roles.xml".

-- Richard
Jul 20 '05 #2

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

Similar topics

6
4223
by: Vincent LIDOU | last post by:
Do not trust values returned by materialized views under SQL Server without frequently checking underlying tables!!! I already posted this message under microsoft.public.sqlserver.server and I'm amazed nobody from Microsoft answered about this problem. By inserting lots of data into our two main tables for about 30 minutes, we can fail our materialized view that performs a count_big on those two tables. Executing (after of course...
3
1961
by: Stijn Oude Brunink | last post by:
Hello I'm using std:vector to hold some pointers vector<CBase*> x; In the debug version I've the following problem: After I've added a couple of pointers using the push_back function and I iterate over x the program crashes in the iteration loop. If I debug the program I see that the Iterator has som strange value which I did not put
5
1296
by: hehongyu2000 | last post by:
I created a very simple asp page, see below, ============== <html> <head></head> <body> <form action="dispatcher.asp" method="post"> <input type="text" name="docket_no"> <input type="submit" name="submit_button" value="GO"> </form> </body>
11
1637
by: Gustavo G. Rondina | last post by:
Hi all I'm writting a simple code to solve an ACM problem (http://acm.uva.es, it is the problem #468). In its code I have the following fragment: freq = calcfreq(hashfreq, strfreq, input); printf("before malloc: %s (%p)\n", input+INPUTLEN); hchars = (char *)malloc(freq*sizeof(char)); schars = (char *)malloc(freq*sizeof(char));
6
8524
by: leonecla | last post by:
Hi everybody, I'm facing a very very strange problem with a very very simple C program... My goal should be to write to a binary file some numbers (integers), each one represented as a sequence of 32 bit. I made this stupid trial code: --------------------------------------------- FILE *fout;
5
1132
by: 2G | last post by:
Hi, I have one project containing all classes that access my db. In another project I have some usercontrols that use these classes to access the db and one of these usercontrols contains the following function: private void cmdSImage_Click(object sender, System.EventArgs e) {
4
1138
by: DAMAR | last post by:
Hello I have (strange for me) problem. I have developed an application , let's say MyApp.exe. This is win-forms application. It has its own configuration file, generated of course by VS.NET and called MyApp.exe.config. I put a path to this application into registry, that the app starts when windows will start. A problem is that I have an error when the app starts - ..exe.config could not be found. But If I start this app manually...
11
1370
by: wASP | last post by:
Hi, I've got a pair of int properties in a class. The properties in question are indexing values - but that's not relevant to my problem - or it's just symptomatic ... sort of. They are declared as follows:
7
2096
by: Andrew Christiansen | last post by:
Hey everyone. I have Visual Basic .NET 2003 and am trying to show images on a treeview control. I have the imagelist on the form filled with images, and have the ImageList property of the treeview control set to the imagelist containing the images I want to be displayed next to each node. It seems that no matter what I do there will be no images displayed next to the nodes during runtime. I tried creating nodes during designtime using...
4
1343
by: jmw080 | last post by:
I am perplexed at the output from this cout statement. The code for the function is: int print_func(int pr_number_row, int pr_number_column) { int count_row = 0, count_column = 0; while(count_row <= pr_number_row) { while(count_column <= pr_number_column) {//Prints every space in the array //This is the dysfunctional cout statement
0
8686
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9173
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9033
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8911
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7748
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5872
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3057
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2345
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2009
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.