Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010
    Posts
    11
    Rep Power
    0

    Default error .dtd file in eclipse rcp galileo

    When I want to validate my .dtd file using Eclipse RCP (galileo), it returns the following error:

    A '(' character or an element type is required in the declaration of element type "L"

    I think the problem is related to the definition of my elements in my .dtd file. Here it is:

    <!ELEMENT experiment (L,T,P,I,expl_vars,resp_vars)>
    <!ATTLIST experiment exp_id CDATA "">
    <!ELEMENT L (#CDATA)>
    <!ELEMENT T (#CDATA)>
    <!ELEMENT P (#CDATA)>
    <!ELEMENT I (#CDATA)>
    <!ELEMENT expl_vars (variable+)>
    <!ELEMENT resp_vars (variable+)>
    <!ELEMENT variable (flow_rate)>
    <!ATTLIST variable var_id CDATA "">
    <!ELEMENT flow_rate (#CDATA)>


    Could somebody point out where my mistake is situated? Or is this error perhaps a bug in Eclipse RCP (which I heavily doubt)?

    thanks in advance

  2. #2
    FON
    FON is offline Senior Member
    Join Date
    Dec 2009
    Location
    Belgrade, Serbia
    Posts
    366
    Rep Power
    6

    Default

    You can check if validation is turned on :

    Eclipse => Window (menu) => Preferences => Validation => DTD Validator

    U can use online validators too, for DTD just paste your code there

    Are you sure u want to use DTD ? Why not Schema instead?

    I don't know what you want to do but if you replace in your code
    CDATA with PCDATA you will get not validation error
    and you will be able to create a valid XML doc from it.

    regards

  3. #3
    Join Date
    Feb 2010
    Posts
    11
    Rep Power
    0

    Default

    FON,

    thanks for the help!

    Changing the element content from #CDATA to #PCDATA solved the errors. Any idea what the underlying reason is for this error?

    While being very new in using XML I indeed read that .DTD files are 'old-fashioned' compared to XML Schema's. However, building this .DTD for me was straight-forward, fast and will serve a non-web application. Therefore I was quite pragmatic and satisfied with this format.

    kind regards,

Similar Threads

  1. problem with eclipse galileo
    By krishnaanu in forum Eclipse
    Replies: 2
    Last Post: 06-01-2010, 08:03 PM
  2. Eclipse Galileo J2EE project
    By tascoa in forum Eclipse
    Replies: 1
    Last Post: 11-26-2009, 04:54 AM
  3. Eclipse galileo with CDT 6.0
    By vin_pll in forum Eclipse
    Replies: 0
    Last Post: 09-08-2009, 07:04 PM
  4. Eclipse Error
    By mgm2010 in forum Eclipse
    Replies: 0
    Last Post: 04-10-2009, 04:25 PM
  5. Eclipse Bug - Can't Read From A File Using Eclipse?
    By carlodelmundo in forum New To Java
    Replies: 6
    Last Post: 01-26-2009, 05:25 PM

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
  •