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 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Apr 2007
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    HTML class kickin' me

    My HTML class was a breeze until we got to XML, which I know absolutely nothing about. I keep trying to read the book and look up tutorials but it's pretty much all greek to me.

    What I've managed to learn I used to try and do this homework, but I keep getting an error message. Can anyone tell me what's wrong with this?
    Code:
    <?xml version="1.0"?>
    <?xml-stylesheet type="xsl" href="D:\Stuff\School\HTML\Project12\lab12-1solution.xsl"?>
    <!DOCTYPE Video
       [
        <!ELEMENT Training-COurses (Adult-ed*)>
        <!ELEMENT Adult-ed (CourseNumber) , (CourseName) , (CourseDescription)>
          <!ELEMENT CourseNumber (#PCDATA)>
          <!ELEMENT CourseName   (#PCDATA)>
          <!ELEMENT CourseDescription (#PCDATA)>
    
       ]
    
    >

  • #2
    Senior Coder Arbitrator's Avatar
    Join Date
    Mar 2006
    Location
    Splendora, Texas, United States of America
    Posts
    3,274
    Thanks
    28
    Thanked 271 Times in 265 Posts
    Quote Originally Posted by Mianame View Post
    What I've managed to learn I used to try and do this homework, but I keep getting an error message. Can anyone tell me what's wrong with this?
    The type pseudo‐attribute in the xml-stylesheet processing instruction (PI) takes the MIME type of your style sheet as its value. The correct MIME type for an XSLT style sheet is application/xml. However, Internet Explorer only recognizes the nonstandard MIME type text/xsl, so youíll probably have to use that instead. (xsl is an invalid value.)

    XML documents are required to have a root element in order to be considered well‐formed. Video is, apparently, your root element, so you need to have <Video></Video> somewhere after the document type declaration.

    If youíre going to use a DTD for validation purposes, then you need to make sure that all used elements and attributes are declared; the root element, Video, isnít declared.
    For every complex problem, there is an answer that is clear, simple, and wrong.


  •  

    Posting Permissions

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