Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Element grouping in DTD

    this may be a stupid question, but im no stranger to making a fool of myself.
    bear with me.

    <!ELEMENT img EMPTY>
    <!ATTLIST ........
    >
    can the elements be grouped together? say seperated with commas.


    also in a notation declaration, how can i keep a file type from being XML parsed? i dont know the syntax
    <!NOTATION .jpeg .........> something like that.

    im prolly just missing some simple information, but because im learning this on my own, there are gaps in my knowledge. heh

    <edit> dunno what forum this goes 2</edit>
    Last edited by cg9com; 01-18-2003 at 10:43 PM.

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #2
    jkd
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    Location
    metro DC
    Posts
    3,163
    Thanks
    1
    Thanked 18 Times in 18 Posts
    I moved this to the XML forum for you, since it deals with validating XML files with a DTD...

  • #3
    Moderator
    Join Date
    May 2002
    Location
    Hayward, CA
    Posts
    1,461
    Thanks
    1
    Thanked 23 Times in 21 Posts

    Re: Element grouping in DTD

    Originally posted by cg9com
    <!ELEMENT img EMPTY>
    <!ATTLIST ........
    >
    can the elements be grouped together? say seperated with commas.
    Yes, they can, but not with commas.

    Code:
    <!ELEMENT (foo | bar) EMPTY>
    I think that's the correct format.
    "The first step to confirming there is a bug in someone else's work is confirming there are no bugs in your own."
    June 30, 2001
    author, Verbosio prototype XML Editor
    author, JavaScript Developer's Dictionary
    https://alexvincent.us/blog

  • #4
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    hey Alex,
    this is what i was working with
    <!ELEMENT html (head, body)>

    the second question i think i got cleared up
    <!NOTATION .gif SYSTEM "image/gif">

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #5
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    some examples on this page show the method im using (commas)
    but ive seen a few pages with the method you suggested Alex

    the notation thing was right, minus the . in gif, dunno why i was adding it as an extension .... ive been working on this for a friend, mainly because i need to learn it myself, i think maybe the ( | | ) format is for a different type of document or something.
    Last edited by cg9com; 01-22-2003 at 06:35 PM.

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •