PageRenderTime 44ms CodeModel.GetById 8ms RepoModel.GetById 1ms app.codeStats 0ms

/bundles/plugins-trunk/XML/test_data/compound_documents/root.xml

#
XML | 36 lines | 24 code | 0 blank | 12 comment | 0 complexity | 2905424f7c3f69c90c42699890b4f79f MD5 | raw file
Possible License(s): BSD-3-Clause, AGPL-1.0, Apache-2.0, LGPL-2.0, LGPL-3.0, GPL-2.0, CC-BY-SA-3.0, LGPL-2.1, GPL-3.0, MPL-2.0-no-copyleft-exception, IPL-1.0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--
  3. - this is the root of a compound document, similar to
  4. user-guide.xml.
  5. - fragment1.xml and fragment2.xml are included via external entities
  6. - they both refer to this file as the root, so when parsing them,
  7. it's this document which is parsed and all irrelevant elements are ignored
  8. - IDs are collected across all fragments, for easy composition of xlinks
  9. -->
  10. <!DOCTYPE book [
  11. <!ENTITY frag1 SYSTEM "fragment1.xml">
  12. <!ENTITY frag2 SYSTEM "fragment2.xml">
  13. <!ENTITY frags SYSTEM "absent.xml">
  14. <!ELEMENT book (chapter*,para*)>
  15. <!ATTLIST book
  16. xml:id ID #IMPLIED
  17. >
  18. <!ELEMENT chapter (title,section*)>
  19. <!ATTLIST chapter
  20. xml:id ID #IMPLIED
  21. >
  22. <!ELEMENT title (#PCDATA)>
  23. <!ELEMENT section (title)>
  24. <!ATTLIST section
  25. xml:id ID #IMPLIED
  26. >
  27. ]>
  28. <book xml:id="root">
  29. &frag1;
  30. <!-- for instance,
  31. "XML Insert" dockable shows all the IDs of the fragments here
  32. -->
  33. &frag2;
  34. <!-- GOOD: the error is reported here, even when parsing sub-documents. -->
  35. &frags;
  36. </book>