We have munged the DocBook rng (and css) files for some extra elements we need.
One of these new elements, which we call <inlineExample> (there's actually a
namespace, but I assume that's irrelevant), has an attribute which allows a
choice among three values, expressed as follows in the .rng schema:
<element name="inlineExample">
...
<optional>
<attribute name="align">
<choice>
<value type="string">horizontal</value>
<value type="string">vertical</value>
<value type="string">tabbed</value>
</choice>
</attribute>
</optional>
<oneOrMore>
<ref name="langData">
...
In XXE, this attribute always appears in the Attributes pane for elements of
this type. However, the attribute sometimes has a dropdown in the Value column
allowing the user to select one of these three values, as I would expect--but
sometimes the Value column contains only a fill-in-the-blank text box, with no
dropdown.
I looked at the underlying XML file to see what would explain why some of these
elements display the drop-down for the attribute and some don't. It appears
that the difference is whitespace between XML elements: if there's no whitespace
between the <inlineExample> tag and its first daughter element's tag, the
dropdown appears; otherwise not. (No, I don't understand why that would cause a
problem, but it's the only difference I can find.)
The schema does not allow for any text element between the <inlineExample>
element and its first daughter (the <langData> in the schema above); but I would
not have expected whitespace to count as a text element. And indeed the schema
validation that XXE performs does not report this as an error. Also, XXE
sometimes inserts whitespace in there in the form of a newline and some space
characters.
I experimented with adding a space character between an <inlineExample> tag and
the following <langData> tag in a text editor, and that indeed prevented the
dropdown from appearing. I wish I could say that removing whitespace would
cause the dropdown to appear, but that only seems to work in some cases (from
what I can tell, in the cases where I inserted the space character in the first
place).
Could this possibly be the reason for the non-appearance of the dropdown
allowing the choice of values? If not, what should we be looking for?
We're using XXE 6.1.0, under Windows 7.
--
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