extend existing dtd

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andreas

    extend existing dtd

    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!


  • Soren Kuula

    #2
    Re: extend existing dtd

    Andreas wrote:[color=blue]
    > 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?[/color]

    Internal subsets might work for you ?

    <!DOCTYPE foo PUBLIC "..." "..." [
    <!ElEMENT my_first_new_el ement....>
    ...
    ]>

    <foo>
    ....
    </foo>

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

    I think there is no other solution.

    Soren

    Comment

    • Soren Kuula

      #3
      Re: extend existing dtd

      Andreas wrote:
      [color=blue]
      > 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[/color]
      my XML[color=blue]
      > DTD on the existing http://www.w3.org/TR/html4/loose.dtd, but I want[/color]
      to add[color=blue]
      > 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[/color]
      W3 DTD[color=blue]
      > into my own file?[/color]


      Internal subsets might work for you ?

      <!DOCTYPE foo PUBLIC "..." "..." [
      <!ElEMENT my_first_new_el ement....>
      ...
      ]>

      <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


      Comment

      Working...