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 .