Dear readers,

I have added some methods to XMLEvent.java to make usage a bit easier, 
mainly:

getStartElement(SyncedCircularBuffer events, LinkedList list)
expectStartElement(events, list)

The objects in list essentially contain a URI and local name, and the 
methods return the first start element matching any of the list 
elements.  It lets you do things like

LinkedList list = new LinkedList();
list.add(..."simple-page-master"...);
list.add(..."page-sequence-master"...);
try {
  do {
    XMLEvent event = XMLEvent.expectStartElement(events, list);
    if (event.localName.equals("simple-page-master")) {
      ...
    } else if (event.localName.equals("page-sequence-master")) {
       ...
    }
  } while (true);
} catch (NoSuchElementException e) {
}

I have also made some notes on property expression parsing at
<http://home.iprimus.com.au/pbwest/xml-fop/docs/html-docs/property-parsing.html>

Peter


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to