commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 34702] - Add support for parsing "document style" xml, eg XHTML.mixed content elements
Date Mon, 02 May 2005 09:23:26 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=34702>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=34702





------- Additional Comments From skitching@apache.org  2005-05-02 11:23 -------
AARGH - the comments somehow got lost. here they are...
====

Currently it is not possible with digester to build an object tree which
represents input such as the following:
  [p]This word is [b]bold[/b] and this word is [i]italic[/i].[/p]

Since April 2004 there has been an example at
  src/examples/api/document-markup
which shows how to subclass Digester in order to implement this, but it would be
nice to integrate this directly into Digester.

The attached patch does this.

The attached patch also has the following impacts:

== substitution
Substitution is now done per-text-segment rather than being applied to the
complete body text. This means that substitution commands that span child
elements are no longer recognised. Example:
  <p>this is ${<foo/>var}</p>
would previously perform substitution on body text "this is ${var}". With this
patch, substitution is done on "this is ${" and "var}" separately meaning that
neither is recognised as a variable. I think this is a good thing!

Substitution is applied to text segments passed to the target of the
SetTextSegmentRule rule. The example code didn't support substitution in text
segments.

== performance
When element X matches a rule instance, there is now a call to the text method
of the rule for each child element of X. Where an element has a hundred child
elements this might be measurable. I still don't think it's a significant
performance issue though. And of course the default implementation of that
method just returns immediately.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message