0

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>
Deduplicator
  • 44,692
  • 7
  • 66
  • 118
cjoy
  • 406
  • 5
  • 14
  • You should quote your system identifier and then look at the answer by @jasso. – Daniel Haley Oct 21 '11 at 17:57
  • it seems that the .dtd includes a few dozen .ent files with relative paths, some of which were inaccessible given the stated URI. I have downloaded the complete set of .dtd, .elt and .ent files and replaced the URI with a reference to the local copy - now the inspection works as expected. – cjoy Oct 22 '11 at 17:28

1 Answers1

1

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>
jasso
  • 13,736
  • 2
  • 36
  • 50
  • while this is certainly true, it should only throw an inspection error for the element, not it's proper subelements. thank you for the effort! – cjoy Oct 22 '11 at 17:25