Reply to: Insert Entity With XML MarkupNovember 21, 2011 at 6:31 pm
I see now. When you say “schema” you mean an actual W3C Schema (not schema in the general sense which includes DTD).
I can reproduce your issue with the Journalist sample, provided I use the journalist.xsd (W3C Schema) and not journalist.dtd.
Support for entities when used with DTDs is clearly defined by the W3C recommendations and the software supports that. The W3C Schema Primer contains a very short addendum here that discusses a very simple entity use case: http://www.w3.org/TR/xmlschema-0/#usingEntities
It does not clearly define how entities should be used. I don't believe we've done any real testing or development in this area (beyond what I've noted below). I've seen various attempts at implementing support for this type of thing in different software, but they seem to disagree with each other (which is understandable given the lack of clearly defined rules).
What is supported in XMetaL is the following type of XML document:
It seems that this is the one case where most XML parsers agree. In the file “bunchofentities.dtd” you may declare entities and they can be used in the document (as with any other DTD) while the Schema is used for validation. However, the entities will be limited to character and text entities. This doesn't give you anything more than what is also supported in the internal subset. i.e.: in both cases you cannot include markup. That will only work when a DTD is being used.
It is possible that we might attempted to support something like this in the future but I would probably argue for clear rules from the W3c before we attempted anything.
To answer your question, if you were to relax your Schema to allow text at these positions that would not help, or at the very best I think it would confuse things further.