Examples of AttributeCollection


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 net.sf.saxon.om.AttributeCollection

                NamespaceDeclarations decl = in.getNamespaceDeclarations();
                for (int i=0; i<decl.getNumberOfNamespaces(); i++) {
                    out.namespace(decl.getNamespaceCode(i), 0);
                }

                AttributeCollection atts = in.getAttributes();
                for (int i=0; i<atts.getLength(); i++) {
                    out.attribute(atts.getNameCode(i), atts.getTypeAnnotation(i),
                            atts.getValue(i), 0, atts.getProperties(i));
                }

                out.startContent();
                break;
View Full Code Here

Examples of net.sf.saxon.om.AttributeCollection

        return false;
    }

    public void prepareAttributes() throws XPathException {

    AttributeCollection atts = getAttributeList();

    String selectAtt = null;
        String nameAtt = null;

    for (int a=0; a<atts.getLength(); a++) {
      String localName = atts.getLocalName(a);
      if (localName.equals("name")) {
            nameAtt = Whitespace.trim(atts.getValue(a));
          } else if (localName.equals("select")) {
            selectAtt = atts.getValue(a);
          } else {
            checkUnknownAttribute(atts.getNameCode(a));
          }
        }

        if (nameAtt==null) {
            reportAbsence("name");
View Full Code Here

Examples of net.sf.saxon.om.AttributeCollection

        return true;
    }

    public void prepareAttributes() throws XPathException {

    AttributeCollection atts = getAttributeList();

    String selectAtt = null;
        String orderAtt = null;
        String dataTypeAtt = null;
        String caseOrderAtt = null;
        String langAtt = null;
        String collationAtt = null;
        String stableAtt = null;

    for (int a=0; a<atts.getLength(); a++) {
      int nc = atts.getNameCode(a);
      String f = getNamePool().getClarkName(nc);
      if (f==StandardNames.SELECT) {
            selectAtt = atts.getValue(a);
          } else if (f==StandardNames.ORDER) {
            orderAtt = Whitespace.trim(atts.getValue(a));
          } else if (f==StandardNames.DATA_TYPE) {
            dataTypeAtt = Whitespace.trim(atts.getValue(a));
          } else if (f==StandardNames.CASE_ORDER) {
            caseOrderAtt = Whitespace.trim(atts.getValue(a));
          } else if (f==StandardNames.LANG) {
            langAtt = Whitespace.trim(atts.getValue(a));
          } else if (f==StandardNames.COLLATION) {
            collationAtt = Whitespace.trim(atts.getValue(a));
            } else if (f==StandardNames.STABLE) {
            stableAtt = Whitespace.trim(atts.getValue(a));
          } else {
            checkUnknownAttribute(nc);
          }
        }
View Full Code Here

Examples of net.sf.saxon.om.AttributeCollection

    protected ItemType getReturnedItemType() {
        return getCommonChildItemType();
    }

    public void prepareAttributes() throws XPathException {
    AttributeCollection atts = getAttributeList();
    for (int a=0; a<atts.getLength(); a++) {
      int nc = atts.getNameCode(a);
          checkUnknownAttribute(nc);
        }
    }
View Full Code Here

Examples of net.sf.saxon.om.AttributeCollection

        return true;
    }

    public void prepareAttributes() throws XPathException {

    AttributeCollection atts = getAttributeList();

    for (int a=0; a<atts.getLength(); a++) {
      int nc = atts.getNameCode(a);
          checkUnknownAttribute(nc);
        }
    }
View Full Code Here

Examples of net.sf.saxon.om.AttributeCollection

        return true;
    }

    public void prepareAttributes() throws XPathException {

    AttributeCollection atts = getAttributeList();

    for (int a=0; a<atts.getLength(); a++) {
      int nc = atts.getNameCode(a);
          checkUnknownAttribute(nc);
        }
    }
View Full Code Here

Examples of net.sf.saxon.om.AttributeCollection

    public boolean mayContainSequenceConstructor() {
        return true;
    }

    public void prepareAttributes() throws XPathException {
    AttributeCollection atts = getAttributeList();

        String validationAtt = null;
        String typeAtt = null;

    for (int a=0; a<atts.getLength(); a++) {
      int nc = atts.getNameCode(a);
      String f = getNamePool().getClarkName(nc);
            if (f.equals(StandardNames.VALIDATION)) {
                validationAtt = Whitespace.trim(atts.getValue(a));
            } else if (f.equals(StandardNames.TYPE)) {
                typeAtt = Whitespace.trim(atts.getValue(a));
          } else {
            checkUnknownAttribute(nc);
          }
        }
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.