[ http://nagoya.apache.org/jira/browse/XALANJ-169?page=history ]

Henry Zongaro updated XALANJ-169:
---------------------------------

      Assign To:     (was: Xalan Developers Mailing List)
           type: Improvement  (was: Bug)
    Description: 
TransformerFactory tfactory = TransformerFactory.newInstance();
XMLReader reader = XMLReaderFactory.createXMLReader();
reader.setContentHandler( new MyContentHandler());
SAXTransformerFactory saxTFactory = (SAXTransformerFactory)tfactory;
XMLFilter filter = saxTFactory.newXMLFilter(new StreamSource("cities.xsl"));
filter.setParent(reader);
filter.parse(new InputSource("cities.xml"));

The above code never invokes setDocumentLocator() method. The startDocument() is
the first method that is invoked. But the spec says,

"SAX parsers are strongly encouraged (though not absolutely required) to supply
a locator: if it does so, it must supply the locator to the application by
invoking this method before invoking any of the other methods in the
ContentHandler interface."
--------------------------------------------------------------------------------
1.Reproducible: Run the attached program. It is very much reproduceable.

2.Specific: It happens with XMLFilter only. If we set ContentHandler to
SAXResult, it works properly and invokes setDocumentLocator().

Platform is SunOS 2.6, Sun Sparc.

  was:
TransformerFactory tfactory = TransformerFactory.newInstance();
XMLReader reader = XMLReaderFactory.createXMLReader();
reader.setContentHandler( new MyContentHandler());
SAXTransformerFactory saxTFactory = (SAXTransformerFactory)tfactory;
XMLFilter filter = saxTFactory.newXMLFilter(new StreamSource("cities.xsl"));
filter.setParent(reader);
filter.parse(new InputSource("cities.xml"));

The above code never invokes setDocumentLocator() method. The startDocument() is
the first method that is invoked. But the spec says,

"SAX parsers are strongly encouraged (though not absolutely required) to supply
a locator: if it does so, it must supply the locator to the application by
invoking this method before invoking any of the other methods in the
ContentHandler interface."
--------------------------------------------------------------------------------
1.Reproducible: Run the attached program. It is very much reproduceable.

2.Specific: It happens with XMLFilter only. If we set ContentHandler to
SAXResult, it works properly and invokes setDocumentLocator().

Platform is SunOS 2.6, Sun Sparc.

    Environment: 
Operating System: Solaris
Platform: Sun

  was:
Operating System: Solaris
Platform: Sun

       Priority: Major
    Bugzilla Id:   (was: 1465)

> setDocumentLocator() is never invoked. The first method invoked is 
> startDocument()
> ----------------------------------------------------------------------------------
>
>          Key: XALANJ-169
>          URL: http://nagoya.apache.org/jira/browse/XALANJ-169
>      Project: XalanJ2
>         Type: Improvement
>   Components: JAXP
>     Versions: 2.0.x
>  Environment: Operating System: Solaris
> Platform: Sun
>     Reporter: Krishna Meduri

>
> TransformerFactory tfactory = TransformerFactory.newInstance();
> XMLReader reader = XMLReaderFactory.createXMLReader();
> reader.setContentHandler( new MyContentHandler());
> SAXTransformerFactory saxTFactory = (SAXTransformerFactory)tfactory;
> XMLFilter filter = saxTFactory.newXMLFilter(new StreamSource("cities.xsl"));
> filter.setParent(reader);
> filter.parse(new InputSource("cities.xml"));
> The above code never invokes setDocumentLocator() method. The startDocument() 
> is
> the first method that is invoked. But the spec says,
> "SAX parsers are strongly encouraged (though not absolutely required) to 
> supply
> a locator: if it does so, it must supply the locator to the application by
> invoking this method before invoking any of the other methods in the
> ContentHandler interface."
> --------------------------------------------------------------------------------
> 1.Reproducible: Run the attached program. It is very much reproduceable.
> 2.Specific: It happens with XMLFilter only. If we set ContentHandler to
> SAXResult, it works properly and invokes setDocumentLocator().
> Platform is SunOS 2.6, Sun Sparc.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to