473,472 Members | 1,728 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

XHTML DTD

I am writing an XHTML extension, to add some attributes to all xhtml
objects, so that for any object, I can have "<a href="http://aol.com"
text="This is a note that is useful for me">

I tried the following dtd, and I'm not sure why it won't work: it
accepts the html tags in the file, but not any of the extended tags.
I'm not sure why.

____________________base-aaa.dtd_______________________

<!ENTITY % aaa-attrs
"required (true | false) #IMPLIED
readonly (true | false) #IMPLIED
random %Text; #IMPLIED"

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

<!-- Then add aaa-attrs to the common attributes -->

<!ENTITY % Common.attrib
"%Core.attrib;
%I18n.attrib;
%Events.attrib;
%aaa-attrs.attrib;"


Jul 24 '05 #1
3 1494
On 14 Jul 2005 03:08:07 -0700, "David Manheim" <da**********@gmail.com>
wrote:
I am writing an XHTML extension, to add some attributes to all xhtml
objects, so that for any object, I can have "<a href="http://aol.com"
text="This is a note that is useful for me">

I tried the following dtd, and I'm not sure why it won't work: it
accepts the html tags in the file, but not any of the extended tags.
I'm not sure why.
[...]
<!-- Then add aaa-attrs to the common attributes -->

<!ENTITY % Common.attrib
"%Core.attrib;
%I18n.attrib;
%Events.attrib;
%aaa-attrs.attrib;"


Without any deeper analysis I have the feeling that it might be caused
by the fact that the entity 'Common.attrib' is already defined in the
original DTD.

According to SGML rules, once an entity is defined it can not be
redefined at a later stage in the parse.

--
Rex
Jul 24 '05 #2
Kind of; I did need it to be put earlier in the file, before i imported
the XHTML dtd, so that when XHTML imports Common.attrib, it imports
mine, which is predefined, instead of it's own.. Of course, it still
doesn't work at all, and I'm not sure why.

Jul 24 '05 #3
David Manheim <da**********@gmail.com> wrote:
Kind of; I did need it to be put earlier in the file, before i
imported the XHTML dtd, so that when XHTML imports Common.attrib,
it imports mine, which is predefined, instead of it's own.. Of
course, it still doesn't work at all, and I'm not sure why.


Defining Common.attrib before you include the XHTML 1.1 DTD
won't help since parameter entites must be defined before they are
used, and unless they are defined in the internal subset you will have
a lot of undefined PEs in Common.attrib. The %Text; PE reference you're
using in aaa-attrs is also undefined.
Furthermore, you define aaa-attrs but then you use %aaa-attrs.attrib;.

As David Carlisle said in your multi-posted message to comp.text.xml,
you can use Common.extra.attrib which is "empty" by default. However,
this won't really work either since the readonly attribute will be
defined twice for some element types.

--
David Håsäther
Jul 24 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Peter Rohleder | last post by:
Hi, I have a few simple questions in order to use modularized xhtml and getting it to work. A simple example may make this obviouse: Lets say we want to create a simple xml-file to reflect...
59
by: Philipp Lenssen | last post by:
I've tested some of the new Nokia 6600 functionality. It ships with WAP2 and XHTML Support (it says). What it does is check the Doctype -- if it's not the XHTML Mobile Profile Doctype, but a...
32
by: jp29 | last post by:
My take on problems composing, serving and rendering XHTML documents/web pages: 1. Typical conscientious web authors are producing XHTML documents (Web pages) that feature valid Markup and with...
16
by: Mcginkel | last post by:
I am trying to find a way to load XHTML content in an Iframe. I use to do this in html by using the following code : var iframeObject = document.createElement("iframe");...
82
by: Buford Early | last post by:
I read this in http://annevankesteren.nl/2004/12/xhtml-notes "A common misconception is that XHTML 1.1 is the latest version of the XHTML series. And although it was released a bit more than a...
2
by: Joris Janssens | last post by:
I'm trying to write a program for validating XHTML 1.1-documents against the XHTML 1.1 DTD (which is actually the same as validating an XML-file) but I always get a "(404) Not found" error. This...
12
by: Alex D. | last post by:
How can I stop asp.net from rendering XHTML istead of HTML? My javascripts are rendering wrong because of that. It is rendering &amp; to clients instead of &. Any help? Thanks, Alejandro.
11
by: Tomek Toczyski | last post by:
What is the best way to attach a caption to an image in xhtml? I can attach a caption to a table by a "<caption>" tag but I would like to do sth similar to an image. How to do it in a natural...
11
by: Michael Powe | last post by:
How can I make an XHTML-compliant form of an expression in this format: document.write("<scr"+"ipt type='text/javascript' src='path/to/file.js'>"+"</scr"+"ipt>"); this turns out to be a...
10
by: Robert Huff | last post by:
Can someone offer suggestions why, on the same server (Apache 2.2.8), this works <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <html lang="en-US"> <head> <link rel=stylesheet...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.