Page 1 of 1

XHTML 1.1 Modularization (adding Target module)

Posted: Mon Mar 05, 2007 9:37 pm
by Skara
feyd | Please use

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]


I'm having trouble adding a target module to my xhtml 1.1 dtd.

The code validates fine (without the target attribute) as xhtml 1.1.  But when trying to create my own doctype using xhtml 1.1 + target module, I recieve strange errors.

I've had a lot of trouble finding much information on this online.  I hope someone knows something about this.

The errors:

[quote][b]Unknown Parse Mode![/b]
    The MIME Media Type (text/html) for this document is used to serve both SGML and XML based documents, and it is not possible to disambiguate it based on the DOCTYPE Declaration in your document. Parsing will continue in SGML mode.

[b]Namespace Found in non-XML Document[/b]
    Namespace "" found, but document type is not XML!

[b]Error  Line 5 column 58:[/b] character data is not allowed here.
<meta http-equiv="Content-Style-Type" content="text/css" />

[b]Error  Line 8 column 76:[/b] character data is not allowed here.
...ss' href='/mylife/source/style.css.php' />[/quote]

I get more-or-less the same errors with or without the meta tags.


The code:

page header:
[syntax="html"]<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//MySiteName//DTD XHTML-with Target//EN" "http://mysiteurl/source/xhtml-target.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
<title>My Site Name</title>
<link rel='stylesheet' type='text/css' href='/source/style.css.php' />
<script type='text/javascript' src='/source/script.js'></script>
</head>
source/xhtml-target.dtd

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<!-- 
    XHTML-with Target
-->

<!--
    Bring in the ENTITIES XHTML data types module for definitions
    of basic data types
-->
<!ENTITY % xhtml-datatypes.module "INCLUDE"> 
<![%xhtml-datatypes.module;[ 
<!ENTITY % xhtml-datatypes.mod 
PUBLIC "-//W3C//ENTITIES XHTML Datatypes 1.0//EN"
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-datatypes-1.mod"> 
%xhtml-datatypes.mod;]]>

<!--
    Bring in the ENTITIES Qualified Name module for namespace 
    declarations and parameter entities
-->
<!ENTITY % xhtml-qname.module "INCLUDE"> 
<![%xhtml-qname.module;[ 
<!ENTITY % xhtml-qname.mod 
PUBLIC "-//W3C//ENTITIES XHTML Qualified Names 1.0//EN"
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-qname-1.mod"> 
%xhtml-qname.mod;]]>

<!-- 
    Bring in the XHTML 1.1 driver
-->
<!ENTITY % xhtml11.dtd PUBLIC "-//W3C//DTD XHTML 1.1//EN"
           "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
%xhtml11.dtd;

<!-- 
    Bring in the Target Module
-->
<!ENTITY % xhtml-target.module "INCLUDE">
<![%xhtml-target.module;[ 
<!ENTITY % xhtml-target.mod 
PUBLIC "-//W3C//ELEMENTS XHTML Target Module//EN"
"http://www.w3.org/TR/xhtml-modularization/DTD/xhtml-target-1.mod"> 
%xhtml-target.mod;]]>
Thanks in advance.


feyd | Please use[/syntax]

Code: Select all

,

Code: Select all

and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read:  [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]

[b]Edit:[/b]  hm.. cool, didn't know those tags existed.  I think they've been added since I joined.  O.o

Posted: Tue Mar 06, 2007 4:31 am
by Kieran Huggins
I get those same errors on my site (exact same dtd.. it's freaky!) and ignore them ;-)

Posted: Tue Mar 06, 2007 6:58 pm
by Skara
ignore them....? :/ I don't like ignoring errors. There has to be a solution.

Posted: Tue Mar 06, 2007 11:17 pm
by Kieran Huggins
when you find one, post it here! ;-)