extend existing dtd

Discussion in 'XML' started by Andreas, Feb 14, 2005.

  1. Andreas

    Andreas Guest

    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!
    Andreas, Feb 14, 2005
    #1
    1. Advertising

  2. Andreas

    Soren Kuula Guest

    Andreas wrote:
    > 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
    Soren Kuula, Feb 15, 2005
    #2
    1. Advertising

  3. Andreas

    Soren Kuula Guest

    Andreas wrote:

    > 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
    Soren Kuula, Feb 15, 2005
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joseph Tilian
    Replies:
    0
    Views:
    333
    Joseph Tilian
    Dec 21, 2004
  2. Ronald Fischer
    Replies:
    4
    Views:
    1,737
    Ronald Fischer
    Mar 17, 2005
  3. nrm
    Replies:
    3
    Views:
    512
  4. Animanera

    Extend an existing DTD

    Animanera, Jul 18, 2003, in forum: XML
    Replies:
    1
    Views:
    2,302
    Richard Tobin
    Jul 18, 2003
  5. test
    Replies:
    2
    Views:
    1,976
    Oliver Wong
    Jul 28, 2006
Loading...

Share This Page