/** * * @return The value of this attribute returned as string */ public String getValue(){ return m_attribute.getSimpleString(); }
AVT avt = new AVT(handler, uri, name, rawName, value, owner);
/** * Call the children visitors. * @param visitor The visitor whose appropriate method will be called. */ protected void callChildVisitors(XSLTVisitor visitor, boolean callAttrs) { if(callAttrs) { if(null != m_name_avt) m_name_avt.callVisitors(visitor); if(null != m_namespace_avt) m_namespace_avt.callVisitors(visitor); } super.callChildVisitors(visitor, callAttrs); }
/** * @see org.w3c.dom.Node * * @return The namespace prefix of this node, or null if it is * unspecified */ public String getPrefix() { String uri = m_attribute.getURI(); String rawName = m_attribute.getRawName(); return (uri.equals(""))? null:rawName.substring(0, rawName.indexOf(":")); }
/** * @see ElemElement#setName(AVT) */ public void setName(AVT v) { if (v.isSimple()) { if (v.getSimpleString().equals("xmlns")) { throw new IllegalArgumentException(); } } super.setName(v); }
/** * Get a literal result attribute by name. * * @param namespaceURI Namespace URI of attribute node to get * @param localName Local part of qualified name of attribute node to get * * @return literal result attribute (AVT) */ public AVT getLiteralResultAttributeNS(String namespaceURI, String localName) { if (null != m_avts) { int nAttrs = m_avts.size(); for (int i = (nAttrs - 1); i >= 0; i--) { AVT avt = (AVT) m_avts.get(i); if (avt.getName().equals(localName) && avt.getURI().equals(namespaceURI)) { return avt; } } // end for } return null; }
int sourceNode = xctxt.getCurrentNode(); String stringedValue = avt.evaluate(xctxt, sourceNode, this); avt.getURI(), avt.getName(), avt.getRawName(), "CDATA", stringedValue, false);
/** * Get a literal result attribute by name. The name is namespaceURI:localname * if namespace is not null. * * @param name Name of literal result attribute to get * * @return literal result attribute (AVT) */ public AVT getLiteralResultAttribute(String name) { if (null != m_avts) { int nAttrs = m_avts.size(); String namespace = null; for (int i = (nAttrs - 1); i >= 0; i--) { AVT avt = (AVT) m_avts.get(i); namespace = avt.getURI(); if ((namespace != null && (!namespace.equals("")) && (namespace +":"+avt.getName()).equals(name))|| ((namespace == null || namespace.equals(""))&& avt.getRawName().equals(name))) { return avt; } } // end for } return null; }
? m_groupingSeparator_avt.evaluate( transformer.getXPathContext(), contextNode, this) : null; if ((digitGroupSepValue != null) && (!m_groupingSeparator_avt.isSimple()) && (digitGroupSepValue.length() != 1)) new Object[]{ Constants.ATTRNAME_NAME, m_groupingSeparator_avt.getName()}); ? m_groupingSize_avt.evaluate( transformer.getXPathContext(), contextNode, this) : null;
String nodeName = m_name_avt == null ? null : m_name_avt.evaluate(xctxt, sourceNode, this); if ((nodeName != null) && (!m_name_avt.isSimple()) && (!XML11Char.isXML11ValidQName(nodeName))) nodeNamespace = m_namespace_avt.evaluate(xctxt, sourceNode, this); if (null == nodeNamespace || (prefix != null && prefix.length()>0 && nodeNamespace.length()== 0) )
/** * This function is called after everything else has been * recomposed, and allows the template to set remaining * values that may be based on some other property that * depends on recomposition. */ public void compose(StylesheetRoot sroot) throws TransformerException { super.compose(sroot); StylesheetRoot.ComposeState cstate = sroot.getComposeState(); java.util.Vector vnames = cstate.getVariableNames(); if(null != m_name_avt) m_name_avt.fixupVariables(vnames, cstate.getGlobalsSize()); if(null != m_namespace_avt) m_namespace_avt.fixupVariables(vnames, cstate.getGlobalsSize()); }
return m_simpleString; }else if (null != m_parts){ final FastStringBuffer buf =getBuffer(); String out = null; int n = m_parts.size();
/** * Return the value of the attribute interpreted as an Attribute * Value Template (in other words, you can use curly expressions * such as href="http://{website}". * * @param rawName Raw name of the attribute to get * @param sourceNode non-null reference to the <a href="http://www.w3.org/TR/xslt#dt-current-node">current source node</a>. * @param transformer non-null reference to the the current transform-time state. * * @return the value of the attribute * * @throws TransformerException */ public String getAttribute( String rawName, org.w3c.dom.Node sourceNode, TransformerImpl transformer) throws TransformerException { AVT avt = getLiteralResultAttribute(rawName); if ((null != avt) && avt.getRawName().equals(rawName)) { XPathContext xctxt = transformer.getXPathContext(); return avt.evaluate(xctxt, xctxt.getDTMHandleFromNode(sourceNode), this); } return null; }
/** * * @return The name of this attribute */ public String getName(){ return m_attribute.getName(); }
/** * @see org.w3c.dom.Node * * @return The namespace URI of this node, or null if it is * unspecified */ public String getNamespaceURI() { String uri = m_attribute.getURI(); return (uri.equals(""))?null:uri; }
? sort.getLang().evaluate(xctxt, sourceNodeContext, foreach) : null; String dataTypeString = sort.getDataType().evaluate(xctxt, sourceNodeContext, foreach); ((null != dataTypeString) && dataTypeString.equals( Constants.ATTRVAL_DATATYPE_NUMBER)) ? true : false; String orderString = sort.getOrder().evaluate(xctxt, sourceNodeContext, foreach); String caseOrderString = caseOrder.evaluate(xctxt, sourceNodeContext, foreach);
int sourceNode = xctxt.getCurrentNode(); String stringedValue = avt.evaluate(xctxt, sourceNode, this); avt.getURI(), avt.getName(), avt.getRawName(), "CDATA", stringedValue, false);
/** * @see org.w3c.dom.Node * * @return The namespace prefix of this node, or null if it is * unspecified */ public String getPrefix() { String uri = m_attribute.getURI(); String rawName = m_attribute.getRawName(); return (uri.length() == 0)? null:rawName.substring(0, rawName.indexOf(":")); }