XML inspection ignores declared elements

319 views Asked by At

I have run into an issue with a custom XML DOCTYPE, where none of the elements seem to get registered by PHPStorm.

Thus, all I get is a ton of red. I have used the "ALT-ENTER -> Fetch DTD" method as advised in the documentation, which got rid of the DOCTYPE URI not being resolved... but the elements are still not considered valid. Is there anything else that needs to be done?

here is a snippet in case you would like to reproduce the issue:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE ONIXmessage SYSTEM http://www.editeur.org/onix/2.1/short/onix-international.dtd>
<ONIXmessage release="2.1">
     <header>
         <m174>foo</m174>
         <m182>bar</m182>
     </header>
</ONIXmessage>
1

There are 1 answers

1
jasso On

A quick validation showed that your document isn't valid. After the <header> element there needs to be at least one of these elements:

  • <product>
  • <mainseriesrecord>
  • <subseriesrecord>