On 13 Aug 2008, at 12:42, Mark Overmeer wrote:

* Actually, this may be an approach to support by default for mixed
elements. However... in your case, fixing the STRUCTURED bug
the mixed attribute at all) will probably work as well.
Hi Mark,

From the docs in 0.93:
[available since 0.86] ComplexType and ComplexContent components can
be declared with the <mixed="true"> attribute. This implies that
text is not limited to the content of containers, but may also be
used inbetween elements. Usually, you will only find ignorable white-
space between elements.

In this example, the a container is marked to be mixed: <a id="5">
before <b>2</b> after </a>

Often the "mixed" option is bending one of both ways: either the
element is needed as text, or the element should be parsed and the
text ignored. The reader has various options to avoid the need of
processing raw XML::LibXML nodes.
What I'd like is an option to combine ATTRIBUTES and STRUCTURAL
handling on the reader. Going back to my particular need, the xml
looks like:


The text will only occur once, and it will always be immediately after
the parent tag. The new option I'm proposing would separate out the
text into the '_' element, perhaps as an array to support multiple
text chunks (overkill for me but may be useful to others). This is
similar to the TEXTUAL option. In addition, the remaining non-text
elements would be processed and transformed into a data structure as
with the STRUCTURAL option.

I would be willing to help implement this option, if you 1) don't
think I'm crazy and 2) can point me in the right direction.



Search Discussions

Discussion Posts


Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 8 of 9 | next ›
Discussion Overview
groupxml-compile @
postedAug 11, '08 at 6:16p
activeAug 25, '08 at 8:35p



site design / logo © 2022 Grokbase