commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Sparr - www.goomzee.com" <m...@goomzee.com>
Subject [Digester] assistance - namespace-aware processing (how to write rules for digest)
Date Sat, 10 Dec 2005 09:23:05 GMT
If I have a document (note the content element referencing external
namespace):

<document>
  <author name="John Doe" />
  <title>Some name of a document</title>
  <exerpt>A brief description of a quotable phrase from
document</exerpt>
  <content xmlns:myco="http://www.company.com/document/schema">
    <myco:heading>This is the heading of the document</myco:heading>
    <myco:sub-heading>This is the sub-heading of the
document</myco:sub-heading>
    <myco:body>
      This is the body content of the document 
      and I can have some text that references a 
      term that may require more explaination so 
      I add a strangeword<myco:footnote symbol="*" expr="refer to user
guide for more information" /> and this footnote will appear at 
      the bottom of the document.
    </myco:body>
  </content>
</document>

I am new to digester but understand I have to write getter/setter
classes to represent the different elements.  Can someone help with
writing the rules to digest this?  I would like some flexibility to have
zero, one or more namespaces declared in my <content> element and the
digester will "digest" the elements within these.

For example, this instance uses a namespace and scheme defined by myco,
but we may want just text with no namespaces, or use
xmlns:xhtml="http://www.w3.org/xhtml/schema" and embed html in the
document.

Where do I start?

Thanks!


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


Mime
View raw message