473,472 Members | 1,728 Online
Bytes | Software Development & Data Engineering Community
Create 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:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:page="http://www.wolterinkwebdesign.com/xml/page"
xmlns:menu="http://www.wolterinkwebdesign.com/xml/menu"
xmlns:role="http://www.wolterinkwebdesign.com/xml/roles">

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

<xsl:param name="absolute_url"/>
<xsl:param name="upload_url"/>
<xsl:param name="document_root"/>
<xsl:param name="role"/>
<xsl:param name="xcd_dir"/>

<xsl:variable name="menu" select="document(concat($document_root,
'/menu.xml'))"/>
<xsl:variable name="roles" select="document(concat($xcd_dir,
'/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="document(concat($xcd_dir,
'/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.wolterinkwebdesign.com/xml/roles">

<!--
! The admin role.
! And admin should have all permisions to do its task
!
!-->
<role id="admin" isadmin="true">
<name>Administrator</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>Bezoeker</name>
<description>Bezoeker van de site</description>
<grants>
<for name="all">
<action name="read" grant="true" />
<action name="edit" grant="true" />
</for>
<for name="gastenboek">
<action name="new" grant="true"/>
<action name="edit" grant="true" />
</for>
<for name="medewerkers">
<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 1365
In article <41***********************@news.wanadoo.nl>,
Tjerk Wolterink <tj***@wolterinkwebdesign.com> wrote:
<xsl:variable name="roles" select="document(concat($xcd_dir,
'/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
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...
3
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...
5
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"...
11
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);...
6
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...
5
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...
4
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...
11
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...
7
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...
4
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; ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.