XHTML 1.1 Modularization (adding Target module)

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

XHTML 1.1 Modularization (adding Target module)

Post 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
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

I get those same errors on my site (exact same dtd.. it's freaky!) and ignore them ;-)
User avatar
Skara
Forum Regular
Posts: 703
Joined: Sat Mar 12, 2005 7:13 pm
Location: US

Post by Skara »

ignore them....? :/ I don't like ignoring errors. There has to be a solution.
User avatar
Kieran Huggins
DevNet Master
Posts: 3635
Joined: Wed Dec 06, 2006 4:14 pm
Location: Toronto, Canada
Contact:

Post by Kieran Huggins »

when you find one, post it here! ;-)
Post Reply