Package org.apache.maven.doxia.sink

Examples of org.apache.maven.doxia.sink.XhtmlBaseSink


        try
        {
            output = getTestWriter( "macro" );
            reader = getTestReader( "macro" );

            Sink sink = new XhtmlBaseSink( output );
            createParser().parse( reader, sink );
            sink.close();
        }
        finally
        {
            IOUtil.close( output );
            IOUtil.close( reader );
View Full Code Here


                MacroRequest request = new MacroRequest( macroParameters, getBasedir() );

                try
                {
                    StringWriter sw = new StringWriter();
                    XhtmlBaseSink sink = new XhtmlBaseSink(sw);
                    executeMacro( macroName, request, sink );
                    sink.close();
                    buffer.append( sw.toString() );
                } catch ( MacroNotFoundException me )
                {
                    throw new MacroExecutionException( "Macro not found: " + macroName, me );
                }
View Full Code Here

        macroParameters.put( "section", "sec1" );

        File basedir = new File( "" );

        StringWriter out = new StringWriter();
        XhtmlBaseSink sink = new XhtmlBaseSink( out );
        MacroRequest request = new MacroRequest( macroParameters, basedir );
        TocMacro macro = new TocMacro();
        macro.execute( sink, request );

        assertTrue( out.toString().contains( "<a href=\"#h21\">h21</a>" ) );
View Full Code Here

                MacroRequest request = new MacroRequest( macroParameters, getBasedir() );

                try
                {
                    StringWriter sw = new StringWriter();
                    XhtmlBaseSink sink = new XhtmlBaseSink( sw );
                    executeMacro( macroName, request, sink );
                    sink.close();
                    buffer.append( sw.toString() );
                } catch ( MacroNotFoundException me )
                {
                    throw new MacroExecutionException( "Macro not found: " + macroName, me );
                }
View Full Code Here

TOP

Related Classes of org.apache.maven.doxia.sink.XhtmlBaseSink

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.