Examples of AVT


Examples of org.apache.xalan.templates.AVT

          ssNode = ssNodes.item(i);
          if (ssNode.getNodeType() == ssNode.ELEMENT_NODE
              && ((Element)ssNode).getTagName().equals("stylesheet")
              && ssNode instanceof ElemLiteralResult)
          {
            AVT avt = ((ElemLiteralResult)ssNode).getLiteralResultAttribute("href");
            String href = avt.evaluate(xctxt,xt, elem);
            String absURI = SystemIDResolver.getAbsoluteURI(href, sysId);
            Templates tmpl = saxTFactory.newTemplates(new StreamSource(absURI));
            TransformerHandler tHandler = saxTFactory.newTransformerHandler(tmpl);
            Transformer trans = tHandler.getTransformer();
           
            // AddTransformerHandler to vector
            vTHandler.addElement(tHandler);

            paramNodes = ssNode.getChildNodes();
            for (int j = 0; j < paramNodes.getLength(); j++)
            {
              paramNode = paramNodes.item(j);
              if (paramNode.getNodeType() == paramNode.ELEMENT_NODE
                  && ((Element)paramNode).getTagName().equals("param")
                  && paramNode instanceof ElemLiteralResult)
              {
                 avt = ((ElemLiteralResult)paramNode).getLiteralResultAttribute("name");
                 String pName = avt.evaluate(xctxt,xt, elem);
                 avt = ((ElemLiteralResult)paramNode).getLiteralResultAttribute("value");
                 String pValue = avt.evaluate(xctxt,xt, elem);
                 trans.setParameter(pName, pValue);
               }
             }
           }
         }
View Full Code Here

Examples of org.apache.xalan.templates.AVT

            throws org.xml.sax.SAXException
  {

    try
    {
      AVT avt = new AVT(handler, uri, name, rawName, value, owner);

      return avt;
    }
    catch (TransformerException te)
    {
View Full Code Here

Examples of org.apache.xalan.templates.AVT

                      throws org.xml.sax.SAXException
  {
    if (getSupportsAVT()) {
      try
      {
        AVT avt = new AVT(handler, uri, name, rawName, value, owner);
        return avt;
      }
      catch (TransformerException te)
      {
        throw new org.xml.sax.SAXException(te);
View Full Code Here

Examples of org.apache.xalan.templates.AVT

            throws org.xml.sax.SAXException
  {
  if (getSupportsAVT()) {
      try
      {
        AVT avt = new AVT(handler, uri, name, rawName, value, owner);
 
      // If an AVT wasn't used, validate the value
      if ((avt.isSimple()) && (value.length() != 1)) {
        handleError(handler, XSLTErrorResources.INVALID_TCHAR, new Object[] {name, value},null);
            return null;
     
        return avt;
      }
View Full Code Here

Examples of org.apache.xalan.templates.AVT

  Object processENUM(StylesheetHandler handler, String uri, String name,
                     String rawName, String value, ElemTemplateElement owner)
                     throws org.xml.sax.SAXException
  {

  AVT avt = null;
  if (getSupportsAVT()) {
      try
      {
        avt = new AVT(handler, uri, name, rawName, value, owner);
       
        // If this attribute used an avt, then we can't validate at this time.
        if (!avt.isSimple()) return avt;
      }
      catch (TransformerException te)
      {
        throw new org.xml.sax.SAXException(te);
      }
View Full Code Here

Examples of org.apache.xalan.templates.AVT

  {
   
    if (getSupportsAVT()) {
      try
      {
        AVT avt = new AVT(handler, uri, name, rawName, value, owner);
 
      // If an AVT wasn't used, validate the value
      if ((avt.isSimple()) && (!XMLChar.isValidNmtoken(value))) {
            handleError(handler,XSLTErrorResources.INVALID_NMTOKEN, new Object[] {name,value},null);
            return null;
     
        return avt;
      }
View Full Code Here

Examples of org.apache.xalan.templates.AVT


  if (getSupportsAVT())
  {
    Double val;
    AVT avt = null;
      try
      {
        avt = new AVT(handler, uri, name, rawName, value, owner);
       
        // If this attribute used an avt, then we can't validate at this time.
        if (avt.isSimple())
        {
          val = Double.valueOf(value);
        }
      }
      catch (TransformerException te)
View Full Code Here

Examples of org.apache.xalan.templates.AVT

  Object processAVT_QNAME(
          StylesheetHandler handler, String uri, String name, String rawName, String value, ElemTemplateElement owner)
            throws org.xml.sax.SAXException
  {

       AVT avt = null;
       try
       {
          avt = new AVT(handler, uri, name, rawName, value, owner);
   
          // If an AVT wasn't used, validate the value
          if (avt.isSimple())
          {
             int indexOfNSSep = value.indexOf(':');

             if (indexOfNSSep >= 0)
             {  
View Full Code Here

Examples of org.apache.xalan.templates.AVT

            throws org.xml.sax.SAXException
  {
   
    if (getSupportsAVT())
    {
        AVT avt = null;
        try
        {
          avt = new AVT(handler, uri, name, rawName, value, owner);
   
          // If an AVT wasn't used, validate the value
          if ((avt.isSimple()) &&  (!XMLChar.isValidNCName(value)))
          {
             handleError(handler,XSLTErrorResources.INVALID_NCNAME,new Object[] {name,value},null);
             return null;
          }     
          return avt;
View Full Code Here

Examples of org.apache.xalan.templates.AVT

  {

    if (getSupportsAVT()) {
      try
      {
        AVT avt = new AVT(handler, uri, name, rawName, value, owner);
 
      // If an AVT wasn't used, validate the value
     // if (avt.getSimpleString() != null) {
         // TODO: syntax check URL value.
          // return SystemIDResolver.getAbsoluteURI(value,
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.