Package org.apache.xalan.xpath.xml

Examples of org.apache.xalan.xpath.xml.XMLParserLiaison


            // Use XSLTProcessorFactory to instantiate an XSLTProcessor.
            XSLTProcessor processor = XSLTProcessorFactory.getProcessor();

            // Create the 3 objects the XSLTProcessor needs to perform the transformation.
            // Fix up the args...
            XMLParserLiaison xmlPL = processor.getXMLProcessorLiaison();
            URL urlTmp = xmlPL.getURLFromString(foFile, null);
            MessageHandler.errorln("xml: " + urlTmp);
            XSLTInputSource xmlSource =
              new XSLTInputSource (urlTmp.toString());
            urlTmp = xmlPL.getURLFromString(xsltFile, null);
            MessageHandler.errorln("xslt: " + urlTmp);
            XSLTInputSource xslSheet =
              new XSLTInputSource (urlTmp.toString());

            XSLTResultTarget xmlResult = new XSLTResultTarget (writer);
View Full Code Here


      }
      else
      {
        try
        {
          XMLParserLiaison parserLiaison = (XMLParserLiaison)execContext;
          java.net.URL url = parserLiaison.getURLFromString(uri, base);
          if((null != url) && (url.toString().length() > 0))
          {
            XSLTInputSource inputSource = new XSLTInputSource(url.toString());
            parserLiaison.parse(inputSource);
            newDoc = parserLiaison.getDocument();
          }
          else
          {
        path.warn(XSLTErrorResources.WARNING0006, new Object[]{((base == null) ? "" : base )+uri}); //"Can not make URL from: "+((base == null) ? "" : base )+uri);
          }
View Full Code Here

   * @param request Provides access to all meaningful parameters to set
   * @see #process
   */
  public void setStylesheetParams(XSLTProcessor xslprocessor, HttpServletRequest request)
  {
    XMLParserLiaison liaison = xslprocessor.getXMLProcessorLiaison();
    try
    {
      xslprocessor.setStylesheetParam("servlet-request",
                                      new XObject(request)); // Update ctor -sc
    }
View Full Code Here

        // TODO: Note the the warning calls below go through XPath, instead
        // of XSLT, as the should.
        java.net.URL url = null;
        try
        {
          XMLParserLiaison parserLiaison = (XMLParserLiaison)execContext;
          url = parserLiaison.getURLFromString(uri, base);
          if((null != url) && (url.toString().length() > 0))
          {
            XSLTInputSource inputSource = new XSLTInputSource(url.toString());
            parserLiaison.parse(inputSource);
            newDoc = parserLiaison.getDocument();
          }
          else
          {
            warn(execContext, XSLTErrorResources.WG_CANNOT_MAKE_URL_FROM, new Object[]{((base == null) ? "" : base )+uri}); //"Can not make URL from: "+((base == null) ? "" : base )+uri);
          }
View Full Code Here

  public void error(XPathSupport execContext, int msg, Object args[])
    throws org.xml.sax.SAXException
 
    String formattedMsg = XSLMessages.createMessage(msg, args);
   
    XMLParserLiaison parserLiaison = (XMLParserLiaison)execContext;
    boolean shouldThrow = parserLiaison.getProblemListener().problem(ProblemListener.XSLPROCESSOR,
                                                    ProblemListener.ERROR,
                                                    null, null, formattedMsg,
                                                    null, 0, 0);                                                   
  }
View Full Code Here

  public void warn(XPathSupport execContext, int msg, Object args[])
    throws org.xml.sax.SAXException
  {
    String formattedMsg = XSLMessages.createWarning(msg, args);
   
    XMLParserLiaison parserLiaison = (XMLParserLiaison)execContext;
    boolean shouldThrow = parserLiaison.getProblemListener().problem(ProblemListener.XSLPROCESSOR,
                                                    ProblemListener.WARNING,
                                                    null, null, formattedMsg,
                                                    null, 0, 0);
                                                   
    if(shouldThrow)
View Full Code Here

            // Use XSLTProcessorFactory to instantiate an XSLTProcessor.
            XSLTProcessor processor = XSLTProcessorFactory.getProcessor();

            // Create the 3 objects the XSLTProcessor needs to perform the transformation.
            // Fix up the args...
            XMLParserLiaison xmlPL = processor.getXMLProcessorLiaison();
            URL urlTmp = xmlPL.getURLFromString(args[0], null);
            System.err.println("XML File: " + args[0]);
            System.err.println("URL: " + urlTmp);
            XSLTInputSource xmlSource =
              new XSLTInputSource (urlTmp.toString());
            urlTmp = xmlPL.getURLFromString(args[1], null);
            System.err.println("XSL File: " + args[1]);
            System.err.println("URL: " + urlTmp);
            XSLTInputSource xslSheet =
              new XSLTInputSource (urlTmp.toString());
View Full Code Here

TOP

Related Classes of org.apache.xalan.xpath.xml.XMLParserLiaison

Copyright © 2018 www.massapicom. 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.