throw new JspTagException(Resources.getMessage("TRANSFORM_XML_IS_EMPTY")); return XmlUtil.newSAXSource(new StringReader(s), xmlSystemId, entityResolver); return XmlUtil.newSAXSource((Reader) xml, xmlSystemId, entityResolver);
throw new JspTagException(Resources.getMessage("TRANSFORM_XML_IS_EMPTY")); return XmlUtil.newSAXSource(new StringReader(s), xmlSystemId, entityResolver); return XmlUtil.newSAXSource((Reader) xml, xmlSystemId, entityResolver);
throw new JspTagException(Resources.getMessage("TRANSFORM_XSLT_IS_EMPTY")); source = XmlUtil.newSAXSource(new StringReader(s), xsltSystemId, entityResolver); } else if (xslt instanceof Reader) { source = XmlUtil.newSAXSource((Reader) xslt, xsltSystemId, entityResolver); } else { throw new JspTagException(Resources.getMessage("TRANSFORM_XSLT_UNSUPPORTED_TYPE", xslt.getClass()));
throw new JspTagException(Resources.getMessage("TRANSFORM_XSLT_IS_EMPTY")); source = XmlUtil.newSAXSource(new StringReader(s), xsltSystemId, entityResolver); } else if (xslt instanceof Reader) { source = XmlUtil.newSAXSource((Reader) xslt, xsltSystemId, entityResolver); } else { throw new JspTagException(Resources.getMessage("TRANSFORM_XSLT_UNSUPPORTED_TYPE", xslt.getClass()));
/** * Return the Source for a document specified as body content. * * @return the document Source * @throws JspTagException if there is a problem with the body content */ Source getSourceFromBodyContent() throws JspTagException, SAXException, ParserConfigurationException { if (bodyContent == null) { throw new JspTagException(Resources.getMessage("TRANSFORM_BODY_IS_NULL")); } String s = bodyContent.getString(); if (s == null) { throw new JspTagException(Resources.getMessage("TRANSFORM_BODY_CONTENT_IS_NULL")); } s = s.trim(); if (s.length() == 0) { throw new JspTagException(Resources.getMessage("TRANSFORM_BODY_IS_EMPTY")); } return XmlUtil.newSAXSource(new StringReader(s), xmlSystemId, entityResolver); }
/** * Return the Source for a document specified as body content. * * @return the document Source * @throws JspTagException if there is a problem with the body content */ Source getSourceFromBodyContent() throws JspTagException, SAXException, ParserConfigurationException { if (bodyContent == null) { throw new JspTagException(Resources.getMessage("TRANSFORM_BODY_IS_NULL")); } String s = bodyContent.getString(); if (s == null) { throw new JspTagException(Resources.getMessage("TRANSFORM_BODY_CONTENT_IS_NULL")); } s = s.trim(); if (s.length() == 0) { throw new JspTagException(Resources.getMessage("TRANSFORM_BODY_IS_EMPTY")); } return XmlUtil.newSAXSource(new StringReader(s), xmlSystemId, entityResolver); }