Spring Framework SimpleTransformErrorListener - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework SimpleTransformErrorListener class.

This code example shows how to use the following methods:
    public void setup() throws Exception {
        final ResourceLoaderURIResolver resolver = new ResourceLoaderURIResolver(new ClassRelativeResourceLoader(getClass()));
         
        this.tFactory = TransformerFactory.newInstance();
        this.tFactory.setURIResolver(resolver);
        this.tFactory.setErrorListener(new SimpleTransformErrorListener(LogFactory.getLog(getClass())));
         
        this.xmlSource = new StreamSource(this.getClass().getResourceAsStream("test.xml"));
    } 
 
    @Test
    public void testIsUserDeepMemberOf() throws Exception {
        final IXalanAuthorizationHelper helperBean = createMock(IXalanAuthorizationHelper.class);
         
        expect(helperBean.canRender("testUser", "portlet-admin")).andReturn(true);
         
        replay(helperBean);
         
        XalanAuthorizationHelper helper = new XalanAuthorizationHelper();
        helper.setAuthorizationHelper(helperBean);
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    public void setup() throws Exception {
        final ResourceLoaderURIResolver resolver = new ResourceLoaderURIResolver(new ClassRelativeResourceLoader(getClass()));
         
        this.tFactory = TransformerFactory.newInstance();
        this.tFactory.setURIResolver(resolver);
        this.tFactory.setErrorListener(new SimpleTransformErrorListener(LogFactory.getLog(getClass())));
         
        this.xmlSource = new StreamSource(this.getClass().getResourceAsStream("test.xml"));
    } 
 
    @Test
    public void testIsUserDeepMemberOf() throws Exception {
        final IXalanMessageHelper helperBean = createMock(IXalanMessageHelper.class);
         
        expect(helperBean.getMessage("im.done", "en_us")).andReturn("I'm Done!");
         
        replay(helperBean);
         
        XalanMessageHelper helper = new XalanMessageHelper();
        helper.setMessageHelper(helperBean);
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    public void setup() throws Exception {
        final ResourceLoaderURIResolver resolver = new ResourceLoaderURIResolver(new ClassRelativeResourceLoader(getClass()));
         
        this.tFactory = TransformerFactory.newInstance();
        this.tFactory.setURIResolver(resolver);
        this.tFactory.setErrorListener(new SimpleTransformErrorListener(LogFactory.getLog(getClass())));
         
        this.xmlSource = new StreamSource(this.getClass().getResourceAsStream("test.xml"));
    } 
 
    @Test
    public void testIsUserDeepMemberOf() throws Exception {
        final IXalanGroupMembershipHelper helperBean = createMock(IXalanGroupMembershipHelper.class);
         
        expect(helperBean.isChannelDeepMemberOf("fnameValue", "local.1")).andReturn(true);
        expect(helperBean.isChannelDeepMemberOf("fnameValue", "local.2")).andReturn(false);
        expect(helperBean.isUserDeepMemberOfGroupName("testUser", "Fragment Owners")).andReturn(true);
         
        replay(helperBean);
         
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    public void setup() throws Exception {
        final ResourceLoaderURIResolver resolver = new ResourceLoaderURIResolver(new ClassRelativeResourceLoader(getClass()));
         
        this.tFactory = TransformerFactory.newInstance();
        this.tFactory.setURIResolver(resolver);
        this.tFactory.setErrorListener(new SimpleTransformErrorListener(LogFactory.getLog(getClass())));
         
        //Load the XML document so it reads the same way the rendering pipeline reads XML 
        final XMLInputFactory xmlInputFactory = XMLInputFactory.newFactory();
        final XMLEventReader eventReader = xmlInputFactory.createXMLEventReader(this.getClass().getResourceAsStream("test.xml"));
        final XMLStreamReader streamReader = new FixedXMLEventStreamReader(eventReader);
        xmlSource = new StAXSource(streamReader);
         
        xslTemplate = tFactory.newTemplates(new StreamSource(this.getClass().getResourceAsStream("test.xsl")));
         
        expected = IOUtils.toString(this.getClass().getResourceAsStream("result.xml"));
    } 
     
    @Test
    public void testDefaultUrl() throws Exception {
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
    private TransformerConfigurationSource xsltParameterSource;
     
    private String beanName;
     
    public XSLTComponent() { 
        this.errorListener = new SimpleTransformErrorListener(LogFactory.getLog(this.getClass()));
    } 
     
    public void setXsltParameterSource(TransformerConfigurationSource xsltParameterSource) {
        this.xsltParameterSource = xsltParameterSource;
    } 
    public void setTransformerSource(TransformerSource transformerSource) {
        this.transformerSource = transformerSource;
    } 
     
    @Override 
    public void setBeanName(String name) {
        this.beanName = name;
    } 
     
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
	private String sourceKey; 
 
	private URIResolver uriResolver; 
 
	private ErrorListener errorListener = new SimpleTransformErrorListener(logger); 
 
	private boolean indent = true; 
 
	private Properties outputProperties; 
 
	private boolean cacheTemplates = true; 
 
	private TransformerFactory transformerFactory; 
 
	private Templates cachedTemplates; 
 
 
	/** 
	 * Specify the XSLT TransformerFactory class to use. 
4
CodeRank
Experience pair programming with AI  Get Codota for Java