www.webdeveloper.com
Results 1 to 6 of 6

Thread: Custom tag in DTD document

Threaded View

  1. #1
    Join Date
    Sep 2008
    Posts
    61

    Smile Custom tag in DTD document

    Hi there!

    I'm building a javascript image gallery. Which uses my user defined tag "gallery".
    And now I want to add this to a DTD document, so that it can be properly validated.

    I've tried to input it like this

    Code:
    <!-- gallery object, block object -->
    
    <!ELEMENT gallery EMPTY>
    <!ATTLIST gallery
      &#37;attrs;
      src         %Text;         #REQUIRED
      height      %Length;       #IMPLIED
      width       %Length;       #IMPLIED
      >
    But the w3c validator is complaining about it!

    Line 12, Column 27: document type does not allow element "gallery" here
    What could I do to make this validated correctly?

    The W3C is not complaining about my DTD document, it's only saying that my gallery tag is not allowed where it is.

    My html document looks like this

    Code:
    <!DOCTYPE html SYSTEM "http://www.mydomain.com/xhtml.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>Image gallery</title>
    
    <script src="inc/js/gallery.js" type="text/javascript"></script>
    
    </head>
    
    <body>
    	<gallery src="images.xml"></gallery>
    </body>
    </html>
    Any one?

    Cheers,
    Artheus
    Last edited by artheus; 01-27-2010 at 02:44 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

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



Recent Articles