⚲
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.43 KB)
Support #3237
» PseudoXMLReader.java
Aniruddha Joag
, 2017-06-01 16:53
package
test.saxon.streaming.transformerhandler
;
import
org.xml.sax.*
;
import
org.xml.sax.helpers.XMLFilterImpl
;
import
java.io.IOException
;
import
java.util.Objects
;
import
java.util.function.Consumer
;
public
class
PseudoXMLReader
extends
XMLFilterImpl
{
private
final
Consumer
<
ContentHandler
>
runMainTransform
;
public
PseudoXMLReader
(
Consumer
<
ContentHandler
>
runMainTransform
)
{
this
.
runMainTransform
=
runMainTransform
;
}
private
ContentHandler
contentHandler
;
@Override
public
ContentHandler
getContentHandler
()
{
return
contentHandler
;
}
@Override
public
void
setContentHandler
(
ContentHandler
handler
)
{
System
.
out
.
println
(
"PseudoXMLReader -> setContentHandler. handler = "
+
handler
.
getClass
().
getName
());
contentHandler
=
handler
;
}
@Override
public
void
setFeature
(
String
name
,
boolean
value
)
throws
SAXNotRecognizedException
,
SAXNotSupportedException
{
// super.setFeature(name, value);
}
@Override
public
void
parse
(
InputSource
input
)
throws
SAXException
,
IOException
{
parseImpl
();
}
@Override
public
void
parse
(
String
systemId
)
throws
SAXException
,
IOException
{
parseImpl
();
}
private
void
parseImpl
()
{
System
.
out
.
println
(
"PseudoXMLReader -> parseImpl(). The (next chained) transformer has called parse. Will call main transform : runMainTransform"
);
runMainTransform
.
accept
(
contentHandler
);
}
}
« Previous
1
…
8
9
10
11
12
…
15
Next »
(10-10/15)
Loading...