Search in sources :

Example 1 with WhiteSpaceInfo

use of org.apache.xalan.templates.WhiteSpaceInfo in project robovm by robovm.

the class ProcessorStripSpace method startElement.

/**
   * Receive notification of the start of an strip-space element.
   *
   * @param handler The calling StylesheetHandler/TemplatesBuilder.
   * @param uri The Namespace URI, or the empty string if the
   *        element has no Namespace URI or if Namespace
   *        processing is not being performed.
   * @param localName The local name (without prefix), or the
   *        empty string if Namespace processing is not being
   *        performed.
   * @param rawName The raw XML 1.0 name (with prefix), or the
   *        empty string if raw names are not available.
   * @param attributes The attributes attached to the element.  If
   *        there are no attributes, it shall be an empty
   *        Attributes object.
   */
public void startElement(StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) throws org.xml.sax.SAXException {
    Stylesheet thisSheet = handler.getStylesheet();
    WhitespaceInfoPaths paths = new WhitespaceInfoPaths(thisSheet);
    setPropertiesFromAttributes(handler, rawName, attributes, paths);
    Vector xpaths = paths.getElements();
    for (int i = 0; i < xpaths.size(); i++) {
        WhiteSpaceInfo wsi = new WhiteSpaceInfo((XPath) xpaths.elementAt(i), true, thisSheet);
        wsi.setUid(handler.nextUid());
        thisSheet.setStripSpaces(wsi);
    }
    paths.clearElements();
}
Also used : WhiteSpaceInfo(org.apache.xalan.templates.WhiteSpaceInfo) Vector(java.util.Vector) Stylesheet(org.apache.xalan.templates.Stylesheet)

Example 2 with WhiteSpaceInfo

use of org.apache.xalan.templates.WhiteSpaceInfo in project robovm by robovm.

the class ProcessorPreserveSpace method startElement.

/**
   * Receive notification of the start of an preserve-space element.
   *
   * @param handler The calling StylesheetHandler/TemplatesBuilder.
   * @param uri The Namespace URI, or the empty string if the
   *        element has no Namespace URI or if Namespace
   *        processing is not being performed.
   * @param localName The local name (without prefix), or the
   *        empty string if Namespace processing is not being
   *        performed.
   * @param rawName The raw XML 1.0 name (with prefix), or the
   *        empty string if raw names are not available.
   * @param attributes The attributes attached to the element.  If
   *        there are no attributes, it shall be an empty
   *        Attributes object.
   */
public void startElement(StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) throws org.xml.sax.SAXException {
    Stylesheet thisSheet = handler.getStylesheet();
    WhitespaceInfoPaths paths = new WhitespaceInfoPaths(thisSheet);
    setPropertiesFromAttributes(handler, rawName, attributes, paths);
    Vector xpaths = paths.getElements();
    for (int i = 0; i < xpaths.size(); i++) {
        WhiteSpaceInfo wsi = new WhiteSpaceInfo((XPath) xpaths.elementAt(i), false, thisSheet);
        wsi.setUid(handler.nextUid());
        thisSheet.setPreserveSpaces(wsi);
    }
    paths.clearElements();
}
Also used : WhiteSpaceInfo(org.apache.xalan.templates.WhiteSpaceInfo) Vector(java.util.Vector) Stylesheet(org.apache.xalan.templates.Stylesheet)

Example 3 with WhiteSpaceInfo

use of org.apache.xalan.templates.WhiteSpaceInfo in project j2objc by google.

the class ProcessorStripSpace method startElement.

/**
 * Receive notification of the start of an strip-space element.
 *
 * @param handler The calling StylesheetHandler/TemplatesBuilder.
 * @param uri The Namespace URI, or the empty string if the
 *        element has no Namespace URI or if Namespace
 *        processing is not being performed.
 * @param localName The local name (without prefix), or the
 *        empty string if Namespace processing is not being
 *        performed.
 * @param rawName The raw XML 1.0 name (with prefix), or the
 *        empty string if raw names are not available.
 * @param attributes The attributes attached to the element.  If
 *        there are no attributes, it shall be an empty
 *        Attributes object.
 */
public void startElement(StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) throws org.xml.sax.SAXException {
    Stylesheet thisSheet = handler.getStylesheet();
    WhitespaceInfoPaths paths = new WhitespaceInfoPaths(thisSheet);
    setPropertiesFromAttributes(handler, rawName, attributes, paths);
    Vector xpaths = paths.getElements();
    for (int i = 0; i < xpaths.size(); i++) {
        WhiteSpaceInfo wsi = new WhiteSpaceInfo((XPath) xpaths.elementAt(i), true, thisSheet);
        wsi.setUid(handler.nextUid());
        thisSheet.setStripSpaces(wsi);
    }
    paths.clearElements();
}
Also used : WhiteSpaceInfo(org.apache.xalan.templates.WhiteSpaceInfo) Vector(java.util.Vector) Stylesheet(org.apache.xalan.templates.Stylesheet)

Example 4 with WhiteSpaceInfo

use of org.apache.xalan.templates.WhiteSpaceInfo in project j2objc by google.

the class ProcessorPreserveSpace method startElement.

/**
 * Receive notification of the start of an preserve-space element.
 *
 * @param handler The calling StylesheetHandler/TemplatesBuilder.
 * @param uri The Namespace URI, or the empty string if the
 *        element has no Namespace URI or if Namespace
 *        processing is not being performed.
 * @param localName The local name (without prefix), or the
 *        empty string if Namespace processing is not being
 *        performed.
 * @param rawName The raw XML 1.0 name (with prefix), or the
 *        empty string if raw names are not available.
 * @param attributes The attributes attached to the element.  If
 *        there are no attributes, it shall be an empty
 *        Attributes object.
 */
public void startElement(StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) throws org.xml.sax.SAXException {
    Stylesheet thisSheet = handler.getStylesheet();
    WhitespaceInfoPaths paths = new WhitespaceInfoPaths(thisSheet);
    setPropertiesFromAttributes(handler, rawName, attributes, paths);
    Vector xpaths = paths.getElements();
    for (int i = 0; i < xpaths.size(); i++) {
        WhiteSpaceInfo wsi = new WhiteSpaceInfo((XPath) xpaths.elementAt(i), false, thisSheet);
        wsi.setUid(handler.nextUid());
        thisSheet.setPreserveSpaces(wsi);
    }
    paths.clearElements();
}
Also used : WhiteSpaceInfo(org.apache.xalan.templates.WhiteSpaceInfo) Vector(java.util.Vector) Stylesheet(org.apache.xalan.templates.Stylesheet)

Aggregations

Vector (java.util.Vector)4 Stylesheet (org.apache.xalan.templates.Stylesheet)4 WhiteSpaceInfo (org.apache.xalan.templates.WhiteSpaceInfo)4