com.devsphere.examples.xml.saxdomix
Class MixedTransformer
java.lang.Object
|
+--javax.xml.transform.Transformer
|
+--com.devsphere.xml.saxdomix.SDXTransformer
|
+--com.devsphere.examples.xml.saxdomix.MixedTransformer
- All Implemented Interfaces:
- SDXController
- public class MixedTransformer
- extends SDXTransformer
This example uses SDXTransformer to apply an XSLT transformation
to each DOM sub-tree created during the mixed SAX-DOM parsing of an XML
document.
- See Also:
SDXTransformer,
TransformerRunner
|
Constructor Summary |
MixedTransformer(java.lang.String xslSystemID)
Does the initialization |
|
Method Summary |
static void |
main(java.lang.String[] args)
Uses TransformerRunner in order to create an instance of
this class, configure it and call its transform() method. |
boolean |
wantDOM(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qualifiedName,
org.xml.sax.Attributes attributes)
Returns true when the application wants to receive
a DOM sub-tree for transforming, that is the current element
has a wantDOM="true" attribute. |
| Methods inherited from class com.devsphere.xml.saxdomix.SDXTransformer |
clearParameters, createBuilder, createResultFilter, createSerializer, getErrorListener, getOutputProperties, getOutputProperty, getParameter, getURIResolver, handleDOM, setErrorListener, setOutputProperties, setOutputProperty, setParameter, setURIResolver, transform |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MixedTransformer
public MixedTransformer(java.lang.String xslSystemID)
throws javax.xml.transform.TransformerException
- Does the initialization
wantDOM
public boolean wantDOM(java.lang.String namespaceURI,
java.lang.String localName,
java.lang.String qualifiedName,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- Returns
true when the application wants to receive
a DOM sub-tree for transforming, that is the current element
has a wantDOM="true" attribute.
- Specified by:
wantDOM in interface SDXController- Specified by:
wantDOM in class SDXTransformer
- Parameters:
namespaceURI - The element's namespace URIlocalName - The element's local namequalifiedName - The element's qualified nameattributes - The element's attributes
- Returns:
- A boolean value indicating whether
the
builder must enter
in DOM parsing mode or must remain
in SAX parsing mode
- Throws:
org.xml.sax.SAXException - If an error must be signaled
main
public static void main(java.lang.String[] args)
- Uses
TransformerRunner in order to create an instance of
this class, configure it and call its transform() method.