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"> <xsl:output 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 |
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. |
Also check if the root directory is accessible to any user. I would change the XSL location first to see if it works.
|
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 |
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 ;)
|
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> <fo:page-sequence master-reference="only" format="A"> <fo:flow flow-name="page-body"> <fo:block> <xsl:apply-templates></xsl:apply-templates> </fo:block> </fo:flow> </fo:page-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.:tisk: :tisk: Next problem : I selected a 18 pt font which isn't working :scratch: What now? Greetings, Ronald |
All times are GMT -5. The time now is 08:40 PM. |