On 03.Jun.2003 -- 12:49 PM, Mato Mira, Fernando wrote:
> What's the correct Java translation of:
> 
> <util:include-expr expr="foo"/> ?
> 
> I can write the expansion directly in the page for now.

Won't help, but here it is:

      XSPUtil.includeString(String.valueOf(foo), this.manager, this.contentHandler);

or

        SAXParser parser = null;
        try {
            parser = (SAXParser) this.manager.lookup(SAXParser.ROLE);
            IncludeXMLConsumer consumer = new IncludeXMLConsumer(this.contentHandler);
            parser.parse((new InputSource( new StringReader( String.valueOf(foo)), 
consumer, consumer);
        } catch (Exception e) {
            throw new CascadingRuntimeException("Could not include page", e);
        } finally {
            if (parser != null) {
                manager.release((Component) parser);
            }
        }

        Chris.
-- 
C h r i s t i a n       H a u l
[EMAIL PROTECTED]
    fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08

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

Reply via email to