Ich finde keine Lösung für folgendes Problem und bin auf dieses Forum gestoßen (Hallo

) ... evtl. hat ja einer 'ne Idee.
Problem:
Ich möchte eine DTD erweitern, indem ich einem bereits definierten Element (in diesem Fall den gemischten inline/block-Elementen aus der
xhtml11.dtd zusätzliche erlaubte Elemente hinzufüge - in diesem Fall ein "qsel-Element":
HTML-Code:
<p> <qsel id="a50" val="50" opt="0:2-4" /> </p>
Ich dachte, ich könne das ungefähr so machen:
HTML-Code:
<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<!DOCTYPE html [
<!ENTITY % stdxhtmlDTD PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
%stdxhtmlDTD;
<!ELEMENT qsel EMPTY>
<!ATTLIST qsel
id ID #IMPLIED
val NMTOKEN "0"
opt CDATA #IMPLIED
>
<!ENTITY % Misc.class "ins | del | script | noscript | qsel" >
]>
<html><head>
<title>test</title>
</head><body>
<p> <qsel id="a50" val="50" opt="0:2-4" /> </p>
</body></html>
Zumindest wird das
hier so angedeutet; aber leider wird das so nix, der Validator sagt dies:
Zitat:
Line 24, Column 43: document type does not allow element "qsel" here
<p> <qsel id="a50" val="50" opt="0:2-4" /> </p>
The element named above was found in a context where it is not allowed. This could mean that you have incorrectly nested elements -- such as a "style" element in the "body" section instead of inside "head" -- or two elements that overlap (which is not allowed).
One common cause for this error is the use of XHTML syntax in HTML documents. Due to HTML's rules of implicitly closed elements, this error can create cascading effects. For instance, using XHTML's "self-closing" tags for "meta" and "link" in the "head" section of a HTML document may cause the parser to infer the end of the "head" section and the beginning of the "body" section (where "link" and "meta" are not allowed; hence the reported error).
|
Da einer der Hauptvorteile von XML seine Erweiterbarkeit ist, hatte ich gehofft, ich kann in XHTML etwas ähnliches erreichen, aber derzeit weiß ich nicht, wie. Hat einer 'ne Idee? Ich möchte nicht die gesammte xhtml11.dtd als editierte Version auf den Server schmeißen, sondern suche eine Möglichkeit, diese gezielt zu erweitern...