1 16 19 package org.apache.xalan.processor; 20 21 import java.util.Vector ; 22 23 import org.apache.xalan.templates.Stylesheet; 24 import org.apache.xalan.templates.WhiteSpaceInfo; 25 import org.apache.xpath.XPath; 26 27 import org.xml.sax.Attributes ; 28 29 36 class ProcessorStripSpace extends ProcessorPreserveSpace 37 { 38 39 55 public void startElement( 56 StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) 57 throws org.xml.sax.SAXException 58 { 59 Stylesheet thisSheet = handler.getStylesheet(); 60 WhitespaceInfoPaths paths = new WhitespaceInfoPaths(thisSheet); 61 setPropertiesFromAttributes(handler, rawName, attributes, paths); 62 63 Vector xpaths = paths.getElements(); 64 65 for (int i = 0; i < xpaths.size(); i++) 66 { 67 WhiteSpaceInfo wsi = new WhiteSpaceInfo((XPath) xpaths.elementAt(i), true, thisSheet); 68 wsi.setUid(handler.nextUid()); 69 70 thisSheet.setStripSpaces(wsi); 71 } 72 paths.clearElements(); 73 74 } 75 } 76 | Popular Tags |