DTD validation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • techie

    #1

    DTD validation

    I'm having a lot of trouble with a DTD that my xml is referencing. As soon
    as I open the xml file in IE, I get the following error:


    A name was started with an invalid character. Error processing resource
    'file:///C:/BP/bp_testing/rtfml_doc.dtd'. Line 1, Position 1

    #PCDATA | inline | character | formatting | link | plaintext | hiddentext |
    a | xlink | linebreak | pagebreak | columnbreak | linktarget | fieldcode |
    footnote | comment |
    ^


    MSXML must have a problem with the '#' of #PCDATA that is defing in my dtd:

    <!ENTITY % inline "#PCDATA | inline | character | formatting | link |
    plaintext | hiddentext | a | xlink | %common;">
    ...
    ...
    <!ELEMENT indexentry (level1 | level2 | level3 | level4 | level5 | level6 |
    level7 | level8 | level9 | %inline;)*>

    I don't know how to get round this error. The dtd is valid according to my
    xml editor XML Spy but I have to make use of MSXML in order to transform the
    xml file.

    Any help would be appreciated.


  • Richard Tobin

    #2
    Re: DTD validation

    In article <-bednWlYHtvn28vc RVn-gA@biscit.net>,
    techie <techie@nospam. biz> wrote:
    [color=blue]
    ><!ENTITY % inline "#PCDATA | inline | character | formatting | link |
    >plaintext | hiddentext | a | xlink | %common;">[/color]
    [color=blue]
    ><!ELEMENT indexentry (level1 | level2 | level3 | level4 | level5 | level6 |
    >level7 | level8 | level9 | %inline;)*>[/color]

    #PCDATA must come first in the mixed context declaration. Move %inline;
    to the start.

    -- Richard

    Comment

    • techie

      #3
      Re: DTD validation

      "Richard Tobin" <richard@cogsci .ed.ac.uk> wrote in message
      news:cj6gc0$g9k $1@pc-news.cogsci.ed. ac.uk...[color=blue]
      > In article <-bednWlYHtvn28vc RVn-gA@biscit.net>,
      > techie <techie@nospam. biz> wrote:
      >[color=green]
      > ><!ENTITY % inline "#PCDATA | inline | character | formatting | link |
      > >plaintext | hiddentext | a | xlink | %common;">[/color]
      >[color=green]
      > ><!ELEMENT indexentry (level1 | level2 | level3 | level4 | level5 | level6[/color][/color]
      |[color=blue][color=green]
      > >level7 | level8 | level9 | %inline;)*>[/color]
      >
      > #PCDATA must come first in the mixed context declaration. Move %inline;
      > to the start.[/color]

      Thanks. This seems to do the trick.


      Comment

      Working...