extend existing dtd

A

Andreas

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 http://www.w3.org/TR/html4/loose.dtd, but I want to add
a few more elements. Is that possible to do and if so, what would be the
easiest way to do it? I mean, without cutting and pasting the entire W3 DTD
into my own file?

Thanks heaps!
 
S

Soren Kuula

Andreas said:
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 http://www.w3.org/TR/html4/loose.dtd, but I want to add
a few more elements. Is that possible to do and if so, what would be the
easiest way to do it? I mean, without cutting and pasting the entire W3 DTD
into my own file?

Internal subsets might work for you ?

<!DOCTYPE foo PUBLIC "..." "..." [
<!ElEMENT my_first_new_element....>
...
]>

<foo>
....
</foo>

But you have to include that into every XML document then,

I think there is no other solution.

Soren
 
S

Soren Kuula

Andreas said:
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 http://www.w3.org/TR/html4/loose.dtd, but I want to add
a few more elements. Is that possible to do and if so, what would be the
easiest way to do it? I mean, without cutting and pasting the entire W3 DTD
into my own file?


Internal subsets might work for you ?

<!DOCTYPE foo PUBLIC "..." "..." [
<!ElEMENT my_first_new_element....>
...
]>

<foo>
....
</foo>

But you have to include that into every XML document then,

OR look in the thread below, "why does a browser...". Maybe you can
include two external entities?

Soren
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,244
Members
46,838
Latest member
KandiceChi

Latest Threads

Top