Mantis - Resin
Viewing Issue Advanced Details
1944 minor always 08-15-07 11:38 08-30-07 11:01
sam  
ferg  
urgent  
closed 3.1.2  
fixed  
none    
none 3.1.3  
0001944: <x:parse> varSax attribute
(rep by M Thompson)

Extending the JSTL XML parse tag to accept an XMLReader
<http://java.sun.com/j2se/1.4.2/docs/api/org/xml/sax/XMLReader.html> [^]

The current JSTL specification states that the XML Parse tag can accept
either a String or a Reader to the xml attribute. It also has a varDom
attribute that can accept a DOM with optional attributes of filter and
systemId to control parsing. It would be really useful to
introduce an alternate attribute named varSax that could accept an
custom XMLReader which the tag would call parse() on and then receive
the SAX call-backs in a JAXP fashion allowing the following use of the
tag. The parse method could be overloaded to have no argument,
systemId, or an InputSource which could come from other attributes to
the tag.

<x:parse var="parsedDoc" varSax="${requestScope.aXmlReader}" scope="page"/>

The tag can then use JAXP to get the data in the same way as XLST or
Schema validation does for processing where in this case the XMLReader
object is set in request scope elsewhere in the framework.
jsp/1g05

Adding a filter with the XMLFilter and leaving var and varDom unassigned will accomplish this.

There are no notes attached to this issue.