Hello Tom,

I tried using the native API too but ran into the same problem when a
DOMImpl is created from my DOMSource. (NullPointerException at
endDocument).

Kind regards,
 Steffen

----------------------------------------------------------------------

Content-Transfer-Encoding: 7bit
Message-ID: <[EMAIL PROTECTED]>
Date: Wed, 29 Aug 2001 08:54:26 -0400
From: Tom Amiro <[EMAIL PROTECTED]>
MIME-Version: 1.0
To: [EMAIL PROTECTED]
Subject: Re: DOMSource for XSLTC
Content-Type: text/plain; charset=us-ascii

Hi,

The XSLTC engineers who worked on the TrAX implementation
are on vacation, so it will be a while before they can help.

The TrAX implementation for XSLTC is not fully debugged.
That may account for the problems you are having.

Since you expressed an interest in performance, you may
be better off using the native XSLTC API. See

http://xml.apache.org/xalan-j/xsltc_usage.html#native_api

It has undergone a lot of testing and is in pretty good shape.

Tom

[EMAIL PROTECTED] wrote:

> Hello,
>
> we tried to improve performance of our application with use of XSLTC.
>
> We use XalanJ 2.2D9, Visual Age 3.5.2 and Xerces 1.4.2.
>
> Our application uses the TraX interface to the transformer like this:
>
> String key = "javax.xml.transform.TransformerFactory";
> String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl";
> Properties props = System.getProperties();
> props.put(key, value);
> System.setProperties(props);
>
> TransformerFactory tFactory = TransformerFactory.newInstance();
> Templates translet = tFactory.newTemplates(new StreamSource
("ourstylesheet.xsl"));
> Transformer transformer = translet.newTransformer();
> transformer.transform(new DOMSource(docToTransform), new
StreamResult(System.out));
>
> Somehow, this crashes when a DOMImpl is created out of our DOMSource.
>
> Namely  in xsltc.dom.DOMImpl$DOMBuilder endDocument():
>
>           // Elements/attributes with the xml prefix are not in a NS
>           if ((!qname.startsWith(XML_STRING)) && (col > -1)) {
>               final String uri = _namesArray[i].substring(0, col);
>               final Integer idx = (Integer)_nsIndex.get(uri);
>              _namespace[i] = idx.shortValue();
>
> it throws a NullPointerException here as idx is null.
>
> uri=http://www.w3.org/2000/xmlns/
> nsIndex={=0}
>
> We have no clue, can you help?
>
> Kind regards and thanks!
>
> Steffen



|------------------------------------+------------------------------------|
|Diese Nachricht ist vertraulich. Sie|This message is confidential and may|
|ist ausschliesslich fuer            |be privileged. It is                |
|den im Adressfeld ausgewiesenen     |intended solely for the named       |
|Adressaten bestimmt.                |addressee. If you are not the       |
|Sollten Sie nicht der vorgesehene   |intended recipient please inform us.|
|Empfaenger sein, so bitten          |Any unauthorised                    |
|wir um eine kurze Nachricht. Jede   |dissemination, distribution or      |
|unbefugte Weiterleitung             |copying hereof is prohibited.       |
|oder Fertigung einer Kopie ist      |As we cannot guarantee the          |
|unzulaessig. Da wir nicht die       |genuineness or completeness of      |
|Echtheit oder Vollstaendigkeit der  |the information contained in this   |
|in dieser Nachricht                 |message, the statements             |
|enthaltenen Informationen           |set forth above are not legally     |
|garantieren koennen, schliessen wir |binding. In connection              |
|die rechtliche Verbindlichkeit der  |therewith, we also refer to our     |
|vorstehenden Erklaerungen           |governing regulations of            |
|und Aeusserungen aus. Wir verweisen |concerning signatory authority      |
|in diesem Zusammenhang              |published in the                    |
|auch auf die  fuer uns geltenden    |standard bank or company signature  |
|Regelungen ueber die                |lists with regard to the            |
|Verbindlichkeit von                 |legally binding effect of statements|
|Willenserklaerungen mit             |made with the intent to             |
|verpflichtendem                     |obligate us.                        |
|Inhalt, die in den bank- bzw.       |                                    |
|unternehmensueblichen               |                                    |
|Unterschriftenverzeichnissen bekannt|                                    |
|gemacht werden.                     |                                    |
|------------------------------------+------------------------------------|




Reply via email to