⚲
Project
Profile
Help
Tour this page
Frequent Planio Questions
Learning Resources
Get started with Agile
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Search
:
Projects
All Projects
Help
Tour this page
Frequent Planio Questions
Learning Resources
Get started with Agile
Sign in
Register
Switch Planio account
Open in Planio App
Share current page
Saxon
Overview
Roadmap
Issues
Calendar
Blog
Documents
Forums
Files
Repository
Download (1.46 KB)
Support #3237
» TransformationSequencingXMLReader.java
Aniruddha Joag
, 2017-06-29 11:35
package
test.saxon.streaming.transformerhandler
;
import
org.xml.sax.*
;
import
org.xml.sax.helpers.XMLFilterImpl
;
import
javax.xml.transform.TransformerException
;
import
java.io.IOException
;
import
java.util.function.Consumer
;
public
class
TransformationSequencingXMLReader
extends
XMLFilterImpl
{
private
final
Transformation
inSequenceTransformation
;
private
final
Consumer
<
ContentHandler
>
transformerReceivingContentHandlerConsumer
;
public
TransformationSequencingXMLReader
(
Transformation
inSequenceTransformation
,
Consumer
<
ContentHandler
>
transformerReceivingContentHandlerConsumer
)
{
this
.
inSequenceTransformation
=
inSequenceTransformation
;
this
.
transformerReceivingContentHandlerConsumer
=
transformerReceivingContentHandlerConsumer
;
}
@Override
public
void
setContentHandler
(
ContentHandler
handler
)
{
transformerReceivingContentHandlerConsumer
.
accept
(
handler
);
}
@Override
public
void
setFeature
(
String
name
,
boolean
value
)
throws
SAXNotRecognizedException
,
SAXNotSupportedException
{
}
@Override
public
void
parse
(
InputSource
input
)
throws
SAXException
,
IOException
{
parseImpl
();
}
@Override
public
void
parse
(
String
systemId
)
throws
SAXException
,
IOException
{
parseImpl
();
}
private
void
parseImpl
()
{
try
{
inSequenceTransformation
.
execute
();
}
catch
(
TransformerException
e
)
{
throw
new
RuntimeException
(
e
);
}
}
}
« Previous
1
…
9
10
11
12
13
…
15
Next »
(11-11/15)
Loading...