Menu

#93 examples not valid

Examples
open
nobody
5
2005-01-21
2005-01-21
Anonymous
No

On my Fedora Core 2 installation, the examples on the
website are not validating:

[alk@titania resume]$ curl -s
http://xmlresume.sourceforge.net/examples/example1.xml
| xmllint --noout --valid -
-:124: element degree: validity error : Element degree
content does not follow the DTD, expecting (level ,
annotation? , major* , minor* , (date | period)? ,
(institution , location?)? , gpa? , subjects? ,
projects?), got (level major date institution annotation )
</degree>
^
[alk@titania resume]$ curl -s
http://xmlresume.sourceforge.net/examples/example2.xml
| xmllint --noout --valid -
-:132: element job: validity error : Element job
content does not follow the DTD, expecting (jobtitle ,
employer , location? , (date | period) , description? ,
projects? , achievements?), got (jobtitle date employer
projects )
</job>
^
-:249: element clearance: validity error : Element
clearance content does not follow the DTD, expecting
(level , organization? , (date | period)? , note?), got
(level period organization )
</clearance>
^

I tried to create a resume.xml from the examples and
have the same problems as above.

Aaron

Discussion

  • Nobody/Anonymous

    Logged In: NO

    JEdit can do validation on the fly if you add the XML plugin.
    When using DTDs, order is important so make sure the
    ordering of elements matches the DTD.

     
  • Dave Horlick

    Dave Horlick - 2006-05-26

    Logged In: YES
    user_id=1370857

    Here is the fix:

    1. move the annotation element of example1.xml so that it is under the level
    element
    2. move the employer element of example2.xml so that it is under the jobtitle
    element
    3. move the organization element on line 249 of example2.xml so that it is
    under the level element

    I would be happy to commit this fix if I were granted CVS access.

     

Log in to post a comment.

MongoDB Logo MongoDB