On 11/22/2014 3:58 AM, Hussein Shafie wrote:
Non-ignoreable whitespace indeed counts as a text element...

Ignoreable whitespace is automatically stripped by XXE at document load time....

How are ignorable and non-ignorable whitespace distinguished? I found some refs on the web that referred to ignorable whitespace with DTDs, but we're using a RelaxNG schema. There's also information in xslt sites about ignoring whitespace, but I don't know how that applies to reading our XML file into XXE. Is there something we need to say in the RNG to allow ignorable whitespace?

Afaict, the "help" document is the only place on xmlmind.com that refers to "ignorable whitespace", and there it's talking about the "Open options." It says, "When no DTD or schema, guess ignorable white space". I have that box checked in the options, but I presume it's irrelevant in this case, because we do have a schema.

And indeed the schema validation that XXE performs does
not report this as an error.
...
1) May be you can see inlineExample or its parent element underlined in orange
or red in the node path bar. When this is the case, this means that you have
lost XXE.

Yeap, I see that now, on the elements that are causing us trouble. I didn't know to look for that if the Validity check said the doc was clean (the validity check on the chapter I'm looking at does flag some IDREFs with missing IDs, but that's just because they're referring to IDs in other chapters--I presume this has nothing to do with the yellow underlining under some <ilr:inlineExample>s).

Since the validity check doesn't find them, is there another way to find all the elements that will show up in the node path bar with a yellow underline? Short of going through them one-by-one looking for yellow underlines.

2) Pressing Shift-F1 (Help|Show Content model) with inlineExample or its parent
selected may also give you useful information. For example, inlineExample or its
parent could be marked as "Using these attributes or child elements may cause
the content model of this element to become ambiguous."

The "show Content Model" dialog doesn't flag anything as ambiguous in the <ilr:inlineExample>; for the next node up, which is <para> in the cases I'm looking at, the dialog flags various kinds of <indexterm>s and <table>s as causing potential ambiguity, but not <ilr:inlineExample>s.

--> My suggestion: change the content model of inlineExample and make it
simpler, especially in terms of where text is allowed.

I guess I could change the RNG to allow whitespace there; I'd rather not allow just any old text. Is that what is meant by "ignorable whitespace"? Alternatively, I could try to eliminate all whitespace between these tags using a text editor, and see if they start to show up again.

We think that our implementation is sufficient for the vast majority of cases.
We do not plan to improve this implementation in the near future (unless the
newest additions to DocBook 5.1 forces us to do it).

I think we'll be fine if I can just figure out this ignorable whitespace thing.
--
        Mike Maxwell
        [email protected]
        "My definition of an interesting universe is
        one that has the capacity to study itself."
        --Stephen Eastmond

--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support

Reply via email to