473,473 Members | 2,111 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Extend an existing DTD

Is there a way to extend an existing DTD (adding only new elements) OR
I've to create a NEW DTD containing both new and old elements?

Thank you very much in advance.
Bye, Animanera. :)
Jul 20 '05 #1
1 1834
In article <d2**************************@posting.google.com >,
Animanera <dr*****@tiscalinet.it> wrote:
Is there a way to extend an existing DTD (adding only new elements) OR
I've to create a NEW DTD containing both new and old elements?


You can write a short new DTD that uses a parameter entity reference
to include the old DTD.

For example, suppose your old DTD was vegetables.dtd and you want to
add an element brussels-sprout, you can put something like this in
new-vegetables.dtd:

<!ENTITY % old SYSTEM "vegetables.dtd">
%old;
<!ELEMENT brussels-sprout EMPTY>
<!ATTLIST brussels-sprout taste #FIXED "disgusting">

The first line declares "old" as an external parameter entity, the old
DTD. The second line includes that entity. Then you continue with
the extra declarations.

This works if you only need to add declarations. If you need to
modify any declarations (for example, to add brussels-sprout to the
content model of some existing element) then you can't do it unless
the original DTD writer planned ahead for it, typically by making the
content models themselves be parameter entities.

-- Richard
--
Spam filter: to mail me from a .com/.net site, put my surname in the headers.

FreeBSD rules!
Jul 20 '05 #2

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

Similar topics

2
by: Andreas | last post by:
Hi guys, I am fairly new to XML, so please forgive me if this questions is really simple: is there a possibility to extend existing DTDs? I would like to base my XML DTD on the existing...
10
by: Jerzy Karczmarczuk | last post by:
Gurus, before I am tempted to signal this as a bug, perhaps you might convince me that it should be so. If I type l=range(4) l.extend() l gives , what else... On the other hand, try
2
by: Boobie | last post by:
I switched to using this function to create element: ---------------------------------------------------- function elem(name, attrs, style, text) { var e = document.createElement(name); if...
0
by: Bernard Dhooghe | last post by:
Suppose a set of programs written in ESQL (C or Cobol) or 4GL, accessing an Informix database. Suppose the Informix' customer owning the souces is willing to see how DB2 could help him, so a DB2...
2
by: centrino | last post by:
hi, I want to extend System.Net.Sockets.ProtocolType to IPinIP protocol, how can i do that. Do i have to make new class or enum stuct for this type ? regards
6
by: jk | last post by:
Looking through WebUIValidation.js, I discovered that the standard validators don't cater for non-numeric date formats (e.g. dd-MMM-yyyy) which I would like to do To keep code to a minimum, I...
3
by: jacobstr | last post by:
I've noticed Object.extend used in a few different ways and I'm having trouble distinguishing why certain usages apply to a given situation. On line 804 Ajax.Base is defined as follows: ...
1
by: Jeremy S. | last post by:
I'm implementing logging via the TraceSource class and related TraceSwitch and TraceListeners classes. The TextWriterTraceListener does much of what I need. But it does not roll the log over at...
6
by: Ioannis Papadopoulos | last post by:
I would like to extend the functionality of all streams in C++ so I can do some fancy stuff like redirecting the streams on the fly. I don't want to reimplement the whole stream support in C++...
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
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 ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.