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
    Oct 2012
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    problems to validate dtd

    Hello
    My name is Carlos a i have some problems with this DTD (is not validated)
    and i dont know why. Somebody help me please? Thanks


    <?xml version="1.0" encoding="UTF-8"?>

    <!DOCTYPE resolucion SYSTEM "practicabuena.dtd">
    <!ELEMENT resolucion (meta, texto)>
    <!ELEMENT meta (logo, organizacion, id_resol, organo, distribucion, fecha)>
    <!ELEMENT logo EMPTY>
    <!ATTLIST logo
    url CDATA #REQUIRED
    >
    <!ELEMENT organizacion (#PCDATA)>
    <!ATTLIST organizacion
    acron CDATA #REQUIRED
    url CDATA #REQUIRED
    >
    <!ELEMENT id_resol (#PCDATA)>
    <!ATTLIST id_resol
    organo CDATA #REQUIRED
    tipo CDATA #REQUIRED
    numero NMTOKEN #REQUIRED
    anyo NMTOKEN #REQUIRED
    >
    <!ELEMENT organo (#PCDATA)>
    <!ELEMENT distribucion (#PCDATA)>
    <!ELEMENT fecha
    <!ATTLIST fecha
    fnorm NMTOKEN #REQUIRED
    >
    <!ELEMENT texto (entradilla, considerandos, decisiones)>
    <!ELEMENT entradilla (ent_resol, ent_organo, ent_aprobacion)>
    <!ELEMENT ent_resol (#PCDATA)>
    <!ELEMENT ent_organo (#PCDATA)>
    <!ELEMENT ent_aprobacion (#PCDATA | fecha | organo | sesion)*)>
    >
    <!ELEMENTsesion (PCDATA)>
    <!ELEMENTconisderandos (considerando+)>
    <!ELEMENT considerando (p)>
    <!ELEMENT p (#PCDATA | enfasis | lugar | entidad | ref)*>
    <!ELEMENT enfasis (#PCDATA)>
    <!ELEMENT lugar (#PCDATA)>
    <!ELEMENT entidad (#PCDATA)>
    <!ATTLIST entidad
    acron NMTOKEN #IMPLIED
    >
    <!ELEMENT ref (#PCDATA)>
    <!ATTLIST ref
    url CDATA #REQUIRED
    >
    <!ELEMENT decisiones (decision+)>
    <!ELEMENT decision (p, lista?)>
    <!ELEMENT lista (item, lista*)>
    <!ATTLIST lista
    tipo CDATA #REQUIRED
    >
    <!ELEMENT item (#PCDATA | enfasis | lugar | entidad | ref)*>
    <!ELEMENT lista (item*)>
    <!ATTLIST lista
    tipo CDATA #REQUIRED
    >

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,297
    Thanks
    23
    Thanked 612 Times in 611 Posts
    Your top line:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    identifies this as an XML file. A DTD file defines the structure of an XML file. I think if you remove the above line you will have a good DTD file.
    Last edited by sunfighter; 11-01-2012 at 12:00 AM.


  •  

    Posting Permissions

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