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 ProcessorPreserveSpace extends XSLTElementProcessor 37 { 38 39 55 public void startElement( 56 StylesheetHandler handler, String uri, String localName, String rawName, 57 Attributes attributes) 58 throws org.xml.sax.SAXException 59 { 60 Stylesheet thisSheet = handler.getStylesheet(); 61 WhitespaceInfoPaths paths = new WhitespaceInfoPaths(thisSheet); 62 setPropertiesFromAttributes(handler, rawName, attributes, paths); 63 64 Vector xpaths = paths.getElements(); 65 66 for (int i = 0; i < xpaths.size(); i++) 67 { 68 WhiteSpaceInfo wsi = new WhiteSpaceInfo((XPath) xpaths.elementAt(i), false, thisSheet); 69 wsi.setUid(handler.nextUid()); 70 71 thisSheet.setPreserveSpaces(wsi); 72 } 73 paths.clearElements(); 74 } 75 } 76 | Popular Tags |