/** * Callback interface for SAX: not for application use */ public void endElement() throws XPathException { flush(); nextReceiver.endElement(); }
/** * Create a TemplatesHandlerImpl and initialise variables. The constructor is protected, because * the Filter should be created using newTemplatesHandler() in the SAXTransformerFactory * class * @param config the Saxon configuration */ protected TemplatesHandlerImpl(Configuration config) { setPipelineConfiguration(config.makePipelineConfiguration()); nodeFactory = new StyleNodeFactory(config, getPipelineConfiguration().getErrorListener()); builder = new TreeBuilder(); builder.setPipelineConfiguration(getPipelineConfiguration()); builder.setNodeFactory(nodeFactory); builder.setLineNumbering(true); StartTagBuffer startTagBuffer = new StartTagBuffer(); UseWhenFilter useWhenFilter = new UseWhenFilter(startTagBuffer); useWhenFilter.setUnderlyingReceiver(builder); useWhenFilter.setPipelineConfiguration(getPipelineConfiguration()); startTagBuffer.setUnderlyingReceiver(useWhenFilter); startTagBuffer.setPipelineConfiguration(getPipelineConfiguration()); StylesheetStripper styleStripper = new StylesheetStripper(); styleStripper.setUnderlyingReceiver(startTagBuffer); styleStripper.setPipelineConfiguration(getPipelineConfiguration()); CommentStripper commentStripper = new CommentStripper(); commentStripper.setUnderlyingReceiver(styleStripper); commentStripper.setPipelineConfiguration(getPipelineConfiguration()); setReceiver(commentStripper); }
/** * Create a TemplatesHandlerImpl and initialise variables. The constructor is protected, because * the Filter should be created using newTemplatesHandler() in the SAXTransformerFactory * class * * @param processor the Saxon s9api processor */ protected TemplatesHandlerImpl(Processor processor) { this.processor = processor; Configuration config = processor.getUnderlyingConfiguration(); setPipelineConfiguration(config.makePipelineConfiguration()); CompilerInfo info = new CompilerInfo(config.getDefaultXsltCompilerInfo()); Compilation compilation = new Compilation(config, info); nodeFactory = compilation.getStyleNodeFactory(true); builder = new LinkedTreeBuilder(getPipelineConfiguration()); builder.setNodeFactory(nodeFactory); builder.setLineNumbering(true); UseWhenFilter useWhenFilter = new UseWhenFilter(compilation, builder, NestedIntegerValue.TWO); StartTagBuffer startTagBuffer = new StartTagBuffer(useWhenFilter); useWhenFilter.setStartTagBuffer(startTagBuffer); StylesheetSpaceStrippingRule rule = new StylesheetSpaceStrippingRule(config.getNamePool()); Stripper styleStripper = new Stripper(rule, startTagBuffer); CommentStripper commentStripper = new CommentStripper(styleStripper); setReceiver(commentStripper); }
styleStripper.setUnderlyingReceiver(startTagBuffer); CommentStripper commentStripper = new CommentStripper(); commentStripper.setUnderlyingReceiver(styleStripper);
/** * Create a TemplatesHandlerImpl and initialise variables. The constructor is protected, because * the Filter should be created using newTemplatesHandler() in the SAXTransformerFactory * class * @param config the Saxon configuration */ protected TemplatesHandlerImpl(Configuration config) { setPipelineConfiguration(config.makePipelineConfiguration()); nodeFactory = new StyleNodeFactory(config, getPipelineConfiguration().getErrorListener()); builder = new TreeBuilder(); builder.setPipelineConfiguration(getPipelineConfiguration()); builder.setNodeFactory(nodeFactory); builder.setLineNumbering(true); StartTagBuffer startTagBuffer = new StartTagBuffer(); UseWhenFilter useWhenFilter = new UseWhenFilter(startTagBuffer); useWhenFilter.setUnderlyingReceiver(builder); useWhenFilter.setPipelineConfiguration(getPipelineConfiguration()); startTagBuffer.setUnderlyingReceiver(useWhenFilter); startTagBuffer.setPipelineConfiguration(getPipelineConfiguration()); StylesheetStripper styleStripper = new StylesheetStripper(); styleStripper.setStylesheetRules(config.getNamePool()); styleStripper.setUnderlyingReceiver(startTagBuffer); styleStripper.setPipelineConfiguration(getPipelineConfiguration()); CommentStripper commentStripper = new CommentStripper(); commentStripper.setUnderlyingReceiver(styleStripper); commentStripper.setPipelineConfiguration(getPipelineConfiguration()); setReceiver(commentStripper); }
/** * Create a TemplatesHandlerImpl and initialise variables. The constructor is protected, because * the Filter should be created using newTemplatesHandler() in the SAXTransformerFactory * class * * @param processor the Saxon s9api processor */ protected TemplatesHandlerImpl(Processor processor) { this.processor = processor; Configuration config = processor.getUnderlyingConfiguration(); setPipelineConfiguration(config.makePipelineConfiguration()); CompilerInfo info = new CompilerInfo(config.getDefaultXsltCompilerInfo()); Compilation compilation = new Compilation(config, info); nodeFactory = compilation.getStyleNodeFactory(true); builder = new LinkedTreeBuilder(getPipelineConfiguration()); builder.setNodeFactory(nodeFactory); builder.setLineNumbering(true); UseWhenFilter useWhenFilter = new UseWhenFilter(compilation, builder, NestedIntegerValue.TWO); StartTagBuffer startTagBuffer = new StartTagBuffer(useWhenFilter); useWhenFilter.setStartTagBuffer(startTagBuffer); StylesheetSpaceStrippingRule rule = new StylesheetSpaceStrippingRule(config.getNamePool()); Stripper styleStripper = new Stripper(rule, startTagBuffer); CommentStripper commentStripper = new CommentStripper(styleStripper); setReceiver(commentStripper); }
styleStripper.setUnderlyingReceiver(startTagBuffer); CommentStripper commentStripper = new CommentStripper(); commentStripper.setUnderlyingReceiver(styleStripper);
/** * Callback interface for SAX: not for application use */ public void endElement () throws XPathException { flush(); nextReceiver.endElement(); }
CommentStripper commentStripper = new CommentStripper(styleStripper);
/** * Callback interface for SAX: not for application use */ public void endElement () throws XPathException { flush(); nextReceiver.endElement(); }
CommentStripper commentStripper = new CommentStripper(styleStripper);
public void startElement (int nameCode, int typeCode, int locationId, int properties) throws XPathException { flush(); nextReceiver.startElement(nameCode, typeCode, locationId, properties); }
CommentStripper commentStripper = new CommentStripper(styleStripper);
public void startElement(NodeName nameCode, SchemaType typeCode, Location location, int properties) throws XPathException { flush(); nextReceiver.startElement(nameCode, typeCode, location, properties); }
CommentStripper commentStripper = new CommentStripper(styleStripper);
public void startElement (int nameCode, int typeCode, int locationId, int properties) throws XPathException { flush(); nextReceiver.startElement(nameCode, typeCode, locationId, properties); }
public void startElement (int nameCode, int typeCode, int locationId, int properties) throws XPathException { flush(); nextReceiver.startElement(nameCode, typeCode, locationId, properties); }
public void startElement(NodeName nameCode, SchemaType typeCode, Location location, int properties) throws XPathException { flush(); nextReceiver.startElement(nameCode, typeCode, location, properties); }
/** * Callback interface for SAX: not for application use */ public void endElement() throws XPathException { flush(); nextReceiver.endElement(); }
/** * Callback interface for SAX: not for application use */ public void endElement () throws XPathException { flush(); nextReceiver.endElement(); }