required elements in a DTD

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    required elements in a DTD

    Hi,

    I want to define that of a group of elements at least one is required. my current method was working in PHP 4 but now I've got a problem with PHP 5 DOMDocument::va lidate().
    DTD snippet
    Code:
    <!ELEMENT datei         (file | (file?, xsl, xml?, par?))>
    (<datei> may have up to 4 child elements of what either <file> or <xsl> must be present)

    in PHP 5 I get the warning:
    Code:
    Warning: DOMDocument::load() [domdocument.load]: 
    Content model of datei is not determinist: (file | (file? , xsl , xml? , par?)) 
    in /Users/Alexander/Sites/kbl5/system/xml/main.struktur.xml, line: 18 
    in /Users/Alexander/Sites/kbl5/test.php on line 3
    is there any way I can define this DTD part differently?

    thanks

    PS: file codes see http://bytes.com/answers/xml/857093-...validating-dtd
  • JamieHowarth0
    Recognized Expert Contributor
    • May 2007
    • 537

    #2
    Moved to PHP as this is not an HTML question.

    codegecko
    Moderator in ASP, HTML/CSS

    Comment

    • Dormilich
      Recognized Expert Expert
      • Aug 2008
      • 8694

      #3
      I know that the base problem lies within PHP, but I thought I could get help on the DTD matter in the HTML forum. maybe I didn't make that clear enough.

      Dormi

      Comment

      Working...