LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-23-2006, 04:12 PM   #1
ronald-be
Member
 
Registered: Aug 2004
Location: Belgium
Distribution: debian 5.02
Posts: 73

Rep: Reputation: 15
XML doesn't find XSL-file


Hi,

Just starting with XML.. And, it doesn't work out !!!

XML-file

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<?xml-stylesheet type="text/xsl" href="/root/xml/cursus/les01.xsl" ?>
...

XSL-file

<?xml version="1.0" ?>

<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xslutput method="xml"/>
...

When opening with Firefox or Mozilla I get :

Error loading stylesheet: (null) file:///root/xml/cursus/les01.xsl

Any idea what's wrong?

Greetings,

ronald
 
Old 03-23-2006, 07:38 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
If you are absolutely sure that your XML and XSL does not contain errors, there could be a permission problem. Do you have permission to read the file at your /root/xml/cursus/ls01.xsl? You might consider a more appropriate path for testing, like /home/ronald-be or something. I also assume you are not playing with Linux as root

P.S: If you are not using a XML editor, I'd recommend jEdit. Simply install the XML plugin and it will check your XML file against whatever you are using (Doctype, Schema, etc) in real-time.
 
Old 03-23-2006, 07:59 PM   #3
mrcheeks
Senior Member
 
Registered: Mar 2004
Location: far enough
Distribution: OS X 10.6.7
Posts: 1,690

Rep: Reputation: 52
Also check if the root directory is accessible to any user. I would change the XSL location first to see if it works.
 
Old 03-25-2006, 05:57 PM   #4
ronald-be
Member
 
Registered: Aug 2004
Location: Belgium
Distribution: debian 5.02
Posts: 73

Original Poster
Rep: Reputation: 15
XML doesn't find XSL

hi,

Well... logging in as root doesn't solve the problem. I also made the two files executables but no result either. Does Firefox need a plugin to use XML? As the same happens with some DTD I Wonder if it's possible there is a problem with the pathnames. THe XSL-file is a new type (XSL-FO). Could there be a problem?

Greetings,

Ronald
 
Old 03-27-2006, 04:14 AM   #5
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
If it's not anything private/personal, you could post both files here so we could test it. It's difficult to debug something when we can't look at the code. You might consider using the code-tags when posting code too
 
Old 03-29-2006, 01:24 PM   #6
ronald-be
Member
 
Registered: Aug 2004
Location: Belgium
Distribution: debian 5.02
Posts: 73

Original Poster
Rep: Reputation: 15
Hello all,

Thanx in advance. I found something out already :

XML

<?xml version="1.0" encoding="utf-8" standalone="no" ?>
<?xml-stylesheet href="file:/root/xml/cursus/les01b.xsl" type="text/xsl
xmlns:fo="http://www.w3.org/1999/XSL/Format" ?>

<!DOCTYPE doc [ <!ELEMENT doc (#PCDATA) > ] >

<doc>
Some base content, containing an inline warning, a fairly
straightforwardpiece requiring emphasis, and some instructions
which require presenting in a different way
</doc>

XSL

<?xml version="1.0" ?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" >

<xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
<fo:layout-master-set>
<fo:simple-page-master
page-height="29.7cm"
page-width="21cm"
master-name="only"
>
<fo:region-body
region-name="page-body"
margin=".7in"
font-size="18pt"
/>
<fo:region-before
region-name="page-before"
extent=".7in"
display-align="before"
/>
<fo:region-after
region-name="page-after"
extent=".7in"
display-align="after"
/>
</fo:simple-page-master>
</fo:layout-master-set>
<foage-sequence master-reference="only" format="A">
<fo:flow flow-name="page-body">
<fo:block>
<xsl:apply-templates></xsl:apply-templates>
</fo:block>
</fo:flow>
</foage-sequence>
</fo:root>
</xsl:template>
</xsl:stylesheet>


The namespace declaration in red was missing. As the textbook doesn't contain a complete XML-file, I couldn't know. Next problem : I selected a 18 pt font which isn't working What now?

Greetings,

Ronald
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update xml and xsl packages? rahul_kulkarni Linux - Newbie 3 01-17-2006 03:38 AM
XSL need help translating XML to html hyperlink qwijibow Programming 1 03-09-2005 05:36 PM
Docbook XSL Stylesheets /etc/xml/catalog Ironica Linux - Software 0 12-10-2004 04:03 AM
XML and XSL Kedelfor Programming 4 09-13-2004 06:30 PM
xml parsing with xsl crabboy Programming 2 03-22-2004 02:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:09 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration