Examples of AttributeCollection


Examples of com.icl.saxon.tree.AttributeCollection

      if (!inSkip) {
  // Reopen all the ones we closed before...
  while (!saveStack.empty()) {
    StartElementInfo elem = (StartElementInfo) saveStack.pop();

    AttributeCollection attr = (AttributeCollection)elem.getAttributes();
    AttributeCollection newAttr = new AttributeCollection(namePool);

    for (int acount = 0; acount < attr.getLength(); acount++) {
      String localName = attr.getLocalName(acount);
      String type = attr.getType(acount);
      String value = attr.getValue(acount);
      String uri = attr.getURI(acount);
      String prefix = "";

      if (localName.indexOf(':') > 0) {
        prefix = localName.substring(0, localName.indexOf(':'));
        localName = localName.substring(localName.indexOf(':')+1);
      }

      if (uri.equals("")
    && ((foStylesheet
         && localName.equals("id"))
        || (!foStylesheet
      && (localName.equals("id")
          || localName.equals("name"))))) {
        // skip this attribute
      } else {
        newAttr.addAttribute(prefix, uri, localName, type, value);
      }
    }

    rtfEmitter.startElement(elem.getNameCode(),
          newAttr,
View Full Code Here

Examples of com.icl.saxon.tree.AttributeCollection

  public void startSpan(Emitter rtf)
    throws TransformerException {
    // no point in doing this for FO, right?
    if (!foStylesheet && namePool != null) {
      int spanName = namePool.allocate("", "", "span");
      AttributeCollection spanAttr = new AttributeCollection(namePool);
      int namespaces[] = new int[1];
      spanAttr.addAttribute("", "", "class", "CDATA", "co");
      rtf.startElement(spanName, spanAttr, namespaces, 0);
    }
  }
View Full Code Here

Examples of com.icl.saxon.tree.AttributeCollection

  formatLineNumber(++lineNumber);

  // Now "reopen" the elements that we closed...
  while (!tempStack.empty()) {
    StartElementInfo elem = (StartElementInfo) tempStack.pop();
    AttributeCollection attr = (AttributeCollection)elem.getAttributes();
    AttributeCollection newAttr = new AttributeCollection(namePool);

    for (int acount = 0; acount < attr.getLength(); acount++) {
      String localName = attr.getLocalName(acount);
      int nameCode = attr.getNameCode(acount);
      String type = attr.getType(acount);
      String value = attr.getValue(acount);
      String uri = attr.getURI(acount);
      String prefix = "";

      if (localName.indexOf(':') > 0) {
        prefix = localName.substring(0, localName.indexOf(':'));
        localName = localName.substring(localName.indexOf(':')+1);
      }

      if (uri.equals("")
    && ((foStylesheet
         && localName.equals("id"))
        || (!foStylesheet
      && (localName.equals("id")
          || localName.equals("name"))))) {
        // skip this attribute
      } else {
        newAttr.addAttribute(prefix, uri, localName, type, value);
      }
    }

    rtfEmitter.startElement(elem.getNameCode(),
         newAttr,
View Full Code Here

Examples of com.icl.saxon.tree.AttributeCollection

    int thisFingerprint = namePool.getFingerprint(nameCode);
    int colFingerprint = namePool.getFingerprint("", "col");
    int foColFingerprint = namePool.getFingerprint(foURI, "table-column");

    if (thisFingerprint == colFingerprint) {
      AttributeCollection attr = new AttributeCollection(namePool, attributes);
      int widthFingerprint = namePool.getFingerprint("", "width");

      if (attr.getValueByFingerprint(widthFingerprint) == null) {
  attr.addAttribute(widthFingerprint, "CDATA", width[numColumns++]);
      } else {
  attr.setAttribute(widthFingerprint, "CDATA", width[numColumns++]);
      }
      attributes = attr;
    } else if (thisFingerprint == foColFingerprint) {
      AttributeCollection attr = new AttributeCollection(namePool, attributes);
      int widthFingerprint = namePool.getFingerprint("", "column-width");

      if (attr.getValueByFingerprint(widthFingerprint) == null) {
  attr.addAttribute(widthFingerprint, "CDATA", width[numColumns++]);
      } else {
  attr.setAttribute(widthFingerprint, "CDATA", width[numColumns++]);
      }
      attributes = attr;
    }

    rtfEmitter.startElement(nameCode, attributes, namespaces, nscount);
View Full Code Here

Examples of com.icl.saxon.tree.AttributeCollection

    }

    try {
      if (userLabel == null && num <= graphicsMax) {
  int imgName = 0;
  AttributeCollection imgAttr = null;
  int namespaces[] = new int[1];

  if (foStylesheet) {
    imgName = namePool.allocate("fo", foURI, "external-graphic");
    imgAttr = new AttributeCollection(namePool);
    imgAttr.addAttribute("", "", "src", "CDATA",
             graphicsPath + num + graphicsExt);
  } else {
    imgName = namePool.allocate("", "", "img");
    imgAttr = new AttributeCollection(namePool);
    imgAttr.addAttribute("", "", "src", "CDATA",
             graphicsPath + num + graphicsExt);
    imgAttr.addAttribute("", "", "alt", "CDATA", label);
  }

  startSpan(rtfEmitter);
  rtfEmitter.startElement(imgName, imgAttr, namespaces, 0);
  rtfEmitter.endElement(imgName);
View Full Code Here

Examples of com.icl.saxon.tree.AttributeCollection

  private void openClosedElements(Emitter rtfEmitter)
    throws TransformerException {
    // Now "reopen" the elements that we closed...
    while (!tempStack.empty()) {
      StartElementInfo elem = (StartElementInfo) tempStack.pop();
      AttributeCollection attr = (AttributeCollection) elem.getAttributes();
      AttributeCollection newAttr = new AttributeCollection(namePool);

      for (int acount = 0; acount < attr.getLength(); acount++) {
  String localName = attr.getLocalName(acount);
  int nameCode = attr.getNameCode(acount);
  String type = attr.getType(acount);
  String value = attr.getValue(acount);
  String uri = attr.getURI(acount);
  String prefix = "";

  if (localName.indexOf(':') > 0) {
    prefix = localName.substring(0, localName.indexOf(':'));
    localName = localName.substring(localName.indexOf(':')+1);
  }

  if (uri.equals("")
      && ((foStylesheet
     && localName.equals("id"))
    || (!foStylesheet
        && (localName.equals("id")
      || localName.equals("name"))))) {
    // skip this attribute
  } else {
    newAttr.addAttribute(prefix, uri, localName, type, value);
  }
      }

      rtfEmitter.startElement(elem.getNameCode(),
            newAttr,
View Full Code Here

Examples of com.icl.saxon.tree.AttributeCollection

  formatLineNumber(++lineNumber);

  // Now "reopen" the elements that we closed...
  while (!tempStack.empty()) {
    StartElementInfo elem = (StartElementInfo) tempStack.pop();
    AttributeCollection attr = (AttributeCollection)elem.getAttributes();
    AttributeCollection newAttr = new AttributeCollection(namePool);

    for (int acount = 0; acount < attr.getLength(); acount++) {
      String localName = attr.getLocalName(acount);
      int nameCode = attr.getNameCode(acount);
      String type = attr.getType(acount);
      String value = attr.getValue(acount);
      String uri = attr.getURI(acount);
      String prefix = "";

      if (localName.indexOf(':') > 0) {
        prefix = localName.substring(0, localName.indexOf(':'));
        localName = localName.substring(localName.indexOf(':')+1);
      }

      if (uri.equals("")
    && ((foStylesheet
         && localName.equals("id"))
        || (!foStylesheet
      && (localName.equals("id")
          || localName.equals("name"))))) {
        // skip this attribute
      } else {
        newAttr.addAttribute(prefix, uri, localName, type, value);
      }
    }

    rtfEmitter.startElement(elem.getNameCode(),
         newAttr,
View Full Code Here

Examples of com.icl.saxon.tree.AttributeCollection

    int thisFingerprint = namePool.getFingerprint(nameCode);
    int colFingerprint = namePool.getFingerprint("", "col");
    int foColFingerprint = namePool.getFingerprint(foURI, "table-column");

    if (thisFingerprint == colFingerprint) {
      AttributeCollection attr = new AttributeCollection(namePool, attributes);
      int widthFingerprint = namePool.getFingerprint("", "width");

      if (attr.getValueByFingerprint(widthFingerprint) == null) {
  attr.addAttribute(widthFingerprint, "CDATA", width[numColumns++]);
      } else {
  attr.setAttribute(widthFingerprint, "CDATA", width[numColumns++]);
      }
      attributes = attr;
    } else if (thisFingerprint == foColFingerprint) {
      AttributeCollection attr = new AttributeCollection(namePool, attributes);
      int widthFingerprint = namePool.getFingerprint("", "column-width");

      if (attr.getValueByFingerprint(widthFingerprint) == null) {
  attr.addAttribute(widthFingerprint, "CDATA", width[numColumns++]);
      } else {
  attr.setAttribute(widthFingerprint, "CDATA", width[numColumns++]);
      }
      attributes = attr;
    }

    rtfEmitter.startElement(nameCode, attributes, namespaces, nscount);
View Full Code Here

Examples of com.icl.saxon.tree.AttributeCollection

  private void openClosedElements(Emitter rtfEmitter)
    throws TransformerException {
    // Now "reopen" the elements that we closed...
    while (!tempStack.empty()) {
      StartElementInfo elem = (StartElementInfo) tempStack.pop();
      AttributeCollection attr = (AttributeCollection) elem.getAttributes();
      AttributeCollection newAttr = new AttributeCollection(namePool);

      for (int acount = 0; acount < attr.getLength(); acount++) {
  String localName = attr.getLocalName(acount);
  int nameCode = attr.getNameCode(acount);
  String type = attr.getType(acount);
  String value = attr.getValue(acount);
  String uri = attr.getURI(acount);
  String prefix = "";

  if (localName.indexOf(':') > 0) {
    prefix = localName.substring(0, localName.indexOf(':'));
    localName = localName.substring(localName.indexOf(':')+1);
  }

  if (uri.equals("")
      && ((foStylesheet
     && localName.equals("id"))
    || (!foStylesheet
        && (localName.equals("id")
      || localName.equals("name"))))) {
    // skip this attribute
  } else {
    newAttr.addAttribute(prefix, uri, localName, type, value);
  }
      }

      rtfEmitter.startElement(elem.getNameCode(),
            newAttr,
View Full Code Here

Examples of com.icl.saxon.tree.AttributeCollection

  public void startSpan(Emitter rtf)
    throws TransformerException {
    // no point in doing this for FO, right?
    if (!foStylesheet && namePool != null) {
      int spanName = namePool.allocate("", "", "span");
      AttributeCollection spanAttr = new AttributeCollection(namePool);
      int namespaces[] = new int[1];
      spanAttr.addAttribute("", "", "class", "CDATA", "co");
      rtf.startElement(spanName, spanAttr, namespaces, 0);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.