Hello,

That bug was fixed in version 2.4.1 of Xalan; you might not be running the
version you think you're running. You can verify the version:
http://xml.apache.org/xalan-j/faq.html#faq-N10057

If you're using Xalan 2.2D11, which is contained within JDK 1.4, please
follow the instructions at http://xml.apache.org/xalan-j/faq.html#faq-N100C
3 on how to set it up.

Hope this helps!

Gordon



                                                                                
                                                                
                      Mougenot Sylvain                                          
                                                                
                      <[EMAIL PROTECTED]        To:       "Xalan (E-mail)" 
<[EMAIL PROTECTED]>                               
                      ffusion.fr>                       cc:                     
                                                                
                                                        Subject:  [DTM] 
Exception during XLST transformation                                    
                      12/23/2002 08:11 AM                                       
                                                                
                                                                                
                                                                
                                                                                
                                                                



CONTEXT<?xml:namespace prefix = o ns =
"urn:schemas-microsoft-com:office:office" />

    JDK 1.4.1

    Orion 1.5.4

    Maverick (root framework of the web-app)

    Xalan 2.4.1

    Xerces 2.2.0



TROUBLE

    When my XML input is relatively large (about 30Ko), sometimes,

    I've an exception (DTMException) fired by Xalan (sea end of the message
for details).



    We used  some Templates to cache XSLT processing (there is the code
below).

QUESTIONS
    Is there some limitation in the amount of datas allowed as xml input ?
    Do someone encounter this trouble ? (and, in this case, have you solved
it?)
    Have I done something wrong ?





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

-----------

javax.xml.transform.TransformerException: org.apache.xml.dtm.DTMException:
Aucun ID DTM disponible (meaning no DTM ID available)
 at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.j

ava:1226)
 at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:

638)
 at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:

1088)
 at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:

1066)
 at
org.infohazard.maverick.transform.XSLTransform$Step.go(XSLTransform.java:254

)
 ...

Where the go method is
----------------------------------------------------------------------------

-----------
public void go(Source input) throws IOException, ServletException{

Transformer trans;
try{
    trans = this.getCompiled().newTransformer(); [getCompiled() fired the
loadTemplate method below]
}catch (TransformerConfigurationException ex){
    throw new ServletException(ex);
}

// Populate any params which might have been set
if (this.getTransformCtx().getParams() != null)
    populateParams(trans, this.getTransformCtx().getParams());
Result res;
...
    res = new StreamResult(this.getNext().getResponse().getOutputStream());
...

try{
    trans.transform(input, res);
}catch (TransformerException ex){
    throw new ServletException(ex);
}
...
}

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

-----------

(path is the xsl file path)
protected Templates loadTemplate(String path, ServletContext servletCtx)
throws ConfigException{

TransformerFactory tFactory = TransformerFactory.newInstance();

if (this.uriResolver != null)
    tFactory.setURIResolver(this.uriResolver);

java.net.URL resURL = servletCtx.getResource(path);

if (resURL == null){
    log.fatal("Resource not found: " + path);
    throw new ConfigException("Resource not found: " + path);
}



log.debug("Template url is: " + resURL.toString());



return tFactory.newTemplates(new StreamSource(resURL.openStream(),
resURL.toString()));
}



**********************************************************************
Ce message et ses �ventuels fichiers attach�s sont confidentiels
et sont uniquement � l'attention de la personne physique ou morale
destinatrice. Si vous avez re�u ce message par erreur, merci d'en
avertir l'exp�diteur.

Ce bas de page assure �galement que ce message a �t� v�rifi� par un
anti-virus
**********************************************************************
CONTEXT<?xml:namespace prefix = o ns
= "urn:schemas-microsoft-com:office:office" />
    JDK 1.4.1
    Orion 1.5.4
    Maverick (root framework of the web-app)
    Xalan 2.4.1
    Xerces 2.2.0

TROUBLE
    When my XML input is relatively large (about 30Ko), sometimes,
    I've an exception (DTMException) fired by Xalan (sea end of the message
ford etails).

    We used  some Templates to cache XSLT processing (there is the code
below).


QUESTIONS
    Is there some limitation in the amount of datas allowed as xml input ?
    Do someone encounter this trouble ? (and, in this case, have you solved
it?)
    Have I done something wrong ?




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


javax.xml.transform.TransformerException: org.apache.xml.dtm.DTMException:
Aucun ID DTM disponible (meaning no DTM ID available)
 at
org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1226)

 at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:638)

 at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1088)

 at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1066)

 at
org.infohazard.maverick.transform.XSLTransform$Step.go(XSLTransform.java:254)

 ...

Where the go method is
---------------------------------------------------------------------------------------


public void go(Source input) throws IOException, ServletException{


Transformer trans;
try{
    trans = this.getCompiled().newTransformer(); [getCompiled() fired the
loadTemplate method below]
}catch (TransformerConfigurationException ex){
    throw new ServletException(ex);
}


// Populate any params which might have been set
if (this.getTransformCtx().getParams() != null)
    populateParams(trans,< B>this.getTransformCtx().getParams());
Result res;
...
    res = new StreamResult(this.getNext().getResponse().getOutputStream());
...

try{
    trans.transform(input,r es);
}catch (TransformerExceptione x){
    throw new ServletException(ex);
}
...
}
---------------------------------------------------------------------------------------


(path is the xsl file path)
protected Templates loadTemplate(String path, ServletContext servletCtx)
throws ConfigException{


      TransformerFactory tFactory = TransformerFactory.newInstance();


      if (this.uriResolver != null)
          tFactory.setURIResolver(this.uriResolver);


      java.net.URL resURL = servletCtx.getResource(path);


      if (resURL == null){
          log.fatal("Resource not found: " + path);
          throw new ConfigException("Resource not found: " + path);
      }


      log.debug("Template url is: " + resURL.toString());


      return tFactory.newTemplates(new StreamSource(resURL.openStream(),
      resURL.toString()));
      }




**********************************************************************
Ce message et ses �ventuels fichiers attach�s sont confidentiels
et sont uniquement � l'attention de la personne physique ou morale
destinatrice. Si vous avez re�u ce message par erreur, merci d'en
avertir l'exp�diteur.

Ce bas de page assure �galement que ce message a �t� v�rifi� par un
anti-virus
**********************************************************************






Reply via email to