Examples of AttributeCollection


Examples of client.net.sf.saxon.ce.om.AttributeCollection

    public static Expression prepareTestAttribute(StyleElement se) throws XPathException {

        String testAtt=null;

    AttributeCollection atts = se.getAttributeList();

    for (int a=0; a<atts.getLength(); a++) {
      int nc = atts.getNameCode(a);
      String f = se.getNamePool().getClarkName(nc);
      if (f.equals(StandardNames.TEST)) {
            testAtt = atts.getValue(a);
          } else {
            se.checkUnknownAttribute(nc);
          }
        }
View Full Code Here

Examples of client.net.sf.saxon.ce.om.AttributeCollection

        this.nodeTest = nodeTest;

        if (node.getNodeKind()==Type.ELEMENT) {
            element = (ElementImpl)node;
            attributes = element.getAttributeList();
            AttributeCollection attlist = element.getAttributeList();
            index = 0;

            if (nodeTest instanceof NameTest) {
              NameTest test = (NameTest)nodeTest;
                index = attlist.getIndexByFingerprint(test.getFingerprint());

                if (index<0) {
                    next = null;
                } else {
                    next = new AttributeImpl(element, index);
                    index = 0;
                    length = 0; // force iteration to select one node only
                }

            } else  {
                index = 0;
                length = attlist.getLength();
                advance();
            }
        }
        else {      // if it's not an element, or if we're not looking for attributes,
                    // then there's nothing to find
View Full Code Here

Examples of client.net.sf.saxon.ce.om.AttributeCollection

   
    public static String getTestAttribute(StyleElement se) throws XPathException {

        String testAtt=null;

    AttributeCollection atts = se.getAttributeList();

    for (int a=0; a<atts.getLength(); a++) {
      int nc = atts.getNameCode(a);
      String f = se.getNamePool().getClarkName(nc);
      if (f.equals(StandardNames.TEST)) {
            testAtt = atts.getValue(a);
          } else {
            se.checkUnknownAttribute(nc);
          }
        }
View Full Code Here

Examples of client.net.sf.saxon.ce.om.AttributeCollection

        return NodeKindTest.TEXT;
    }

    public void prepareAttributes() throws XPathException {

    AttributeCollection atts = getAttributeList();

    String selectAtt = null;
        String valueAtt = null;
    String countAtt = null;
    String fromAtt = null;
    String levelAtt = null;
    String formatAtt = null;
    String gsizeAtt = null;
    String gsepAtt = null;
    String langAtt = null;
    String letterValueAtt = null;
        String ordinalAtt = null;

    for (int a=0; a<atts.getLength(); a++) {
      int nc = atts.getNameCode(a);
      String f = getNamePool().getClarkName(nc);
      if (f.equals(StandardNames.SELECT)) {
            selectAtt = atts.getValue(a);
            } else if (f.equals(StandardNames.VALUE)) {
            valueAtt = atts.getValue(a);
          } else if (f.equals(StandardNames.COUNT)) {
            countAtt = atts.getValue(a);
          } else if (f.equals(StandardNames.FROM)) {
            fromAtt = atts.getValue(a);
          } else if (f.equals(StandardNames.LEVEL)) {
            levelAtt = Whitespace.trim(atts.getValue(a));
          } else if (f.equals(StandardNames.FORMAT)) {
            formatAtt = atts.getValue(a);
          } else if (f.equals(StandardNames.LANG)) {
            langAtt = atts.getValue(a);
          } else if (f.equals(StandardNames.LETTER_VALUE)) {
            letterValueAtt = Whitespace.trim(atts.getValue(a));
          } else if (f.equals(StandardNames.GROUPING_SIZE)) {
            gsizeAtt = Whitespace.trim(atts.getValue(a));
          } else if (f.equals(StandardNames.GROUPING_SEPARATOR)) {
            gsepAtt = atts.getValue(a);
            } else if (f.equals(StandardNames.ORDINAL)) {
                ordinalAtt = atts.getValue(a);
          } else {
            checkUnknownAttribute(nc);
          }
        }
View Full Code Here

Examples of client.net.sf.saxon.ce.om.AttributeCollection

  @Override
  protected void prepareAttributes() throws XPathException {
        String objectAtt = null;
        String selectAtt = null;
        String nameAtt = null;
    AttributeCollection atts = getAttributeList();

    for (int a=0; a<atts.getLength(); a++) {
      int nc = atts.getNameCode(a);
      String f = getNamePool().getClarkName(nc);
      if (f == "object") {
            objectAtt = Whitespace.trim(atts.getValue(a));
            } else if (f == StandardNames.SELECT) {
                selectAtt = atts.getValue(a);
            } else if (f == StandardNames.NAME) {
                nameAtt = atts.getValue(a);
            } else {
            checkUnknownAttribute(nc);
          }
        }
View Full Code Here

Examples of client.net.sf.saxon.ce.om.AttributeCollection

    public void prepareAttributes() throws XPathException {

        String waitAtt=null;

        AttributeCollection atts = getAttributeList();

        for (int a=0; a<atts.getLength(); a++) {
            int nc = atts.getNameCode(a);
            String f = getNamePool().getClarkName(nc);
            if (f.equals("wait")) {
                waitAtt = atts.getValue(a);
            } else {
                checkUnknownAttribute(nc);
            }
        }
View Full Code Here

Examples of client.net.sf.saxon.ce.om.AttributeCollection

    public void prepareAttributes() throws XPathException {

        String selectAtt = null;

    AttributeCollection atts = getAttributeList();
    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 {
            checkUnknownAttribute(nc);
          }
        }
View Full Code Here

Examples of client.net.sf.saxon.ce.om.AttributeCollection

        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 com.icl.saxon.tree.AttributeCollection

    }

    try {
      if (userLabel == null && num <= unicodeMax) {
  int inName = 0;
  AttributeCollection inAttr = null;
  int namespaces[] = new int[1];

  if (!unicodeFont.equals("")) {
    if (foStylesheet) {
      inName = namePool.allocate("fo", foURI, "inline");
      inAttr = new AttributeCollection(namePool);
      inAttr.addAttribute("", "", "font-family", "CDATA", unicodeFont);
    } else {
      inName = namePool.allocate("", "", "font");
      inAttr = new AttributeCollection(namePool);
      inAttr.addAttribute("", "", "face", "CDATA", unicodeFont);
    }

    startSpan(rtfEmitter);
    rtfEmitter.startElement(inName, inAttr, namespaces, 0);
  }
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
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.