org.writersforge.catalan.transform.xform
Class StyleProcessor
java.lang.Object
|
+--org.writersforge.catalan.transform.BaseNodeProcessor
|
+--org.writersforge.catalan.transform.xform.XFormProcessor
|
+--org.writersforge.catalan.transform.xform.StyleProcessor
- All Implemented Interfaces:
- org.writersforge.bellows.traverse.NodeProcessor
- public class StyleProcessor
- extends XFormProcessor
A Datum-only NodeProcessor for changing the formatting style of XML element
names and attributes. Also handles switching between element and
attribute data storage, collapsing PCDATA-only elements into attributes of
the parent element, or expanding attributes into PCDATA-only elements.
- Author:
- jsheets
|
Constructor Summary |
StyleProcessor(java.lang.String query,
org.writersforge.bellows.util.PropertyName.PropertyStyle style,
java.lang.Boolean collapse)
Creates a new instance of StyleProcessor. |
|
Method Summary |
protected void |
transformNode(org.writersforge.bellows.Datum node,
org.writersforge.bellows.Datum root)
Performs an in-place transformation on the supplied Datum tree. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StyleProcessor
public StyleProcessor(java.lang.String query,
org.writersforge.bellows.util.PropertyName.PropertyStyle style,
java.lang.Boolean collapse)
- Creates a new instance of StyleProcessor. The style and collapse
parameters are both optional, and will be ignored if nulls are passed
in.
- Parameters:
query - Bellows query path to select the source node(s)style - formatting style for element and attribute namescollapse - collapse if true, expand if false, and do nothing if
null
transformNode
protected void transformNode(org.writersforge.bellows.Datum node,
org.writersforge.bellows.Datum root)
- Performs an in-place transformation on the supplied Datum tree.
- Specified by:
transformNode in class XFormProcessor
- Parameters:
node - the current node to operate uponroot - the root of the entire XML tree