[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: TrAX

Subject: RE: TrAX
From: Johannes Döbler <jd@xxxxxxxxxxxxxx>
Date: Wed, 21 Nov 2001 15:17:11 +0100
trax features
seems you are mixing saxon features and trax features.
If you want to use a certain parser, you can use a javax.xml.transform.sax.SAXSource instead of a StreamSource and pass the parser along with it.


----------------------------------
TransformerFactory factory = TransformerFactory.newInstance();

SAXSource source = new SAXSource(
    new FormatTranslatorParser(),
    new InputSource(fSource));

t.transform(source, new StreamResult(fOutFile));
----------------------------------

Cheers,
Johannes


Hello there,

I'm using the TrAX in my java application and would like
the application to use my custom parser.

I've written the following code to do this
-------------------------------------------------
  TransformerFactory factory = TransformerFactory.newInstance();

  factory.setAttribute(FeatureKeys.SOURCE_PARSER_CLASS,
"FormatTranslatorParser");


Transformer t = factory.newTransformer(new StreamSource(fStyleSheet)); t.transform(new StreamSource(fSource), new StreamResult(fOutFile)); -------------------------------------------------------------

and I get the following error msg

Exception in thread "main" java.lang.IllegalArgumentException: Not
supported: http://icl.com/saxon/feature/sourceParserClass
        at
org.apache.xalan.processor.TransformerFactoryImpl.setAttribute(TransformerFa
ctoryImpl.java:558)
        at FormatTranslator.main(FormatTranslator.java:29)


XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list


Current Thread
  • TrAX
    • Sabrina Fords - Tue, 20 Nov 2001 11:05:53 -0500 (EST)
      • cutlass - Tue, 20 Nov 2001 11:13:53 -0500 (EST)
      • <Possible follow-ups>
      • Sabrina Fords - Tue, 20 Nov 2001 11:24:47 -0500 (EST)
        • Johannes Döbler - Wed, 21 Nov 2001 09:18:28 -0500 (EST) <=

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.