Home Forums General XMetaL Discussion Relax NG and XInclude? Reply To: Relax NG and XInclude?


Reply to: Relax NG and XInclude?

You are correct, I'm talking about file entities, not graphic entities and text entities mostly work.

I would prefer xinclude support. Entities are cheesy SGML cruft.

#3 is annoying, but there are several other limitations:

If you double click on entity icon in the main (with a DOCTYPE) file, XMetaL is fine and gives you all the editing help in the sub file that you would have in the main file. However if you reload the sub-file entity, you are prompted to find the DTD. I think this could be worked around if XMetaL knew to look for a PI or something that indicated the location of the parent doc (and/or DTD). Likewise, if you press F9 to validate in an included file, it obviously can't validate because there's no DOCTYPE, but there's no build in mechanism to indicate the name of the parent document. I worked around this one with some scripting that looks for a PI to tell it the name of the parent document. But that kind of thing could be built in. I guess I could post my scripts here.

If you have a file entity within a file entity, XMetaL loses the ability to give you any editing assistance, all macros stop working, etc. So basically you just can't do that. Again, if XMetaL knew to look for a PI pointing to the parent doc, it could parse that doc's DOCTYPE and keep going.

If you use text entities in file entities, XMetaL doesn't resolve them in the file entity like it does in the main book. You only see a box with the entity name.

You run into problems if you use file entities and text entities with preview:
1. Declare a file entity (foo, referring to foo.xml), the corresponding file (foo.xml), and a text entity (bar, with a value of baz) in the DOCTYPE.
2. Reference the file entity in the document.
3. Reference the text entity in the file entity,
When you try to preview the document in the preview pane, you get an error. If you inspect the temp file it creates for the preview, HM3A.xml, sure enough, &foo.xml; and its declaration are there, but the declaration of the bar entity is missing. I’m surprised it doesn’t just resolve all the entities for the purposes of the temp file.

I recall some problem with catalog files and entities too, but I'd have to dig in old emails to find them.