Author Topic: XHTML -> parse error  (Read 1399 times)

0 Members and 1 Guest are viewing this topic.

Andre

  • Guest
XHTML -> parse error
on: Tue, 25. February 2003 - 18:22:34
Hi,

ich schreibe seit einiger zeit meine templates xhtml konform. (1.0 transitional) Plötzlich gab es bei vLIB dann auch einen parse error bis ich dann herausgefunden hatte an was da liegt:
Im kopf einer xhtml datei steht ja:

Quote
<?xml version="1.0" encoding="ISO-8859-1"?> 
<DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de"> 
Solch eine Datei konnte vLIB nicht mehr parsen. Entfernte ich die erste Zeile (<?xml version.....) so ging wieder alles einwandfrei jedoch war mein layout des Templates am A....

Also ich hoffe man könnte die vlib klasse vielleicht kurz manipulieren damit er die Datei trotzdem parsed.

Danke schonmal im vorraus
Last Edit: Sun, 23. January 2005 - 16:39:36 by ClausVB

Offline ClausVB

  • Administrator
  • Hero Member
  • *****
  • Posts: 566
    • Homepage: clausvb.de
XHTML -> parse error
Reply #1 on: Wed, 26. February 2003 - 20:23:02
Sorry, ich mache nur den deutschen Support. Ich entwickle vLIB nicht. Dass musst Du leider im englischen Forum posten. Dort werden Bugs erkannt und klassifiziert.

releasedj

  • Guest
XHTML -> parse error
Reply #2 on: Fri, 28. February 2003 - 11:16:56
The reason you are receiving this error is because the PHP interprator thinks that anything starting with "<?", i.e., "<?xml" is actually php code, which in this case is not true.

What you must do is to set the short_open_tag to off in your php.ini file.

This will then force php to only recognize the "<?php ?>" or "script language=php></script>" style tags.

Kind regards,

Kelvin

[EDIT] ClausVB: deleted (ugly) german translation
Last Edit: Sun, 23. January 2005 - 16:37:54 by ClausVB

Andre

  • Guest
XHTML -> parse error
Reply #3 on: Fri, 28. February 2003 - 13:43:50
Thanks a lot.
But I havn't access to the php.ini (webspace). Isn't there another solution to avoid the error??

So if it would make too big problems to modify the lib i'll use:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

instead of xhtml.

PS: I run php in cgi-bin, can i use the cache function too? Because an error occures when i switch to the cache-mode.
PSS: sorry i know it's the wrong forum for english support but i'm too lazy to open a new thread in the right one :)

---
Andi

releasedj

  • Guest
XHTML -> parse error
Reply #4 on: Fri, 28. February 2003 - 13:56:43
I try not to change vLIB to fix another programs problems. I would suggest using Transitional HTML if you're not able to change the php.ini file.

As for the cache, you must make sure that you have the correct path set in your vlibIni.php file, and that the directory that you wish to use has write access from the webserver, then it should work.

Regards,

Kelvin

Andre

  • Guest
XHTML -> parse error
Reply #5 on: Tue, 04. March 2003 - 15:22:16
Today I had an idea:
I simply wrote:
<?PHP
echo('<?xml version="1.0" encoding="ISO-8859-1"?>' . "
");
?>
in my .html - Template an it works ! :)

And thanks a lot. Caching is working now too.
->great performance :)

releasedj

  • Guest
XHTML -> parse error
Reply #6 on: Tue, 04. March 2003 - 15:30:55
Quote
Today I had an idea:
I simply wrote:
<?PHP
echo(<?xml version="1.0" encoding="ISO-8859-1"?> . "
");
?>
in my .html - Template an it works :)

And thanks a lot. Caching is working now too.
->great performance :)

Great.

You could also have set variable to write to your template, i.e.:

Code: [Select]
In the template
tmpl_var name=xml_dec escape=none /

In your php
tmpl-setVarxml_dec, ?xml version=1.0 encoding=ISO-8859-1?;

Regards,
Kelvin
Last Edit: Sun, 23. January 2005 - 16:40:18 by ClausVB

Andre

  • Guest
XHTML -> parse error
Reply #7 on: Tue, 04. March 2003 - 15:38:34
:) Yes this idea came 3 Minutes after my first one. :)