Examples of QElement


Examples of com.caucho.xml.QElement

  protected String getXslLocal(Node node)
  {
    if (! (node instanceof Element))
      return null;

    QElement elt = (QElement) node;

    String ns = elt.getNamespaceURI();
    String prefix = elt.getPrefix();

    if (ns == null || ns.equals("")) {
      return (elt.getNodeName().startsWith("xsl:") ?
              elt.getNodeName().substring(4) :
              null);
    }
    else if (ns.startsWith(XSLNS) &&
             (ns.length() == XSLNS.length() || ns.charAt(XSLNS.length()) == '/'))
      return elt.getLocalName();
    else
      return null;
  }
View Full Code Here

Examples of com.caucho.xml.QElement

  protected String getXtpLocal(Node node)
  {
    if (! (node instanceof Element))
      return null;

    QElement elt = (QElement) node;

    String ns = elt.getNamespaceURI();
    String prefix = elt.getPrefix();

    if (ns == null || ns.equals("")) {
      return (elt.getNodeName().startsWith("xtp:") ?
              elt.getNodeName().substring(4) :
              null);
    }
    else if (ns.startsWith(XTPNS))
      return elt.getLocalName();
    else
      return null;
  }
View Full Code Here

Examples of com.caucho.xml.QElement

    _doc = xsl;
    if (_doc instanceof CauchoDocument)
      _qDoc = (CauchoDocument) _doc;

    QElement qTop = null;
    if (top instanceof QElement)
      qTop = (QElement) top;

    /*
    if (qTop != null && qTop.getFilename() != null)
View Full Code Here

Examples of com.caucho.xml.QElement

   * Start the top-level stylesheet generation.
   */
  private void generateStylesheet(Element elt, boolean isTop)
    throws Exception
  {
    QElement element = (QElement) elt;
    _isCauchoXsl = ! element.getAttribute("xsl-caucho").equals("");

    String systemId = element.getBaseURI();
    Path oldContext = _context;

    if (systemId != null)
      _context = _context.lookup(systemId);
   
View Full Code Here

Examples of com.caucho.xml.QElement

    throws Exception
  {
    if (! (element instanceof QElement))
      return;
   
    QElement elt = (QElement) element;
    String excludeNamespace;
    excludeNamespace = element.getAttribute("exclude-result-prefixes");
    if (! excludeNamespace.equals("")) {
      for (String prefix : excludeNamespace.split("[,\\s]+")) {

  String ns = elt.getNamespace(prefix);
  if (ns == null)
    throw error(elt, L.l("`{0}' must be a namespace prefix",
                               prefix));
  _excludedNamespaces.put(ns, "");
      }
View Full Code Here

Examples of com.caucho.xml.QElement

    Document xsl = readFile(href, path);
   
    if (xsl == null)
      throw new FileNotFoundException(href);

    QElement top = (QElement) xsl.getDocumentElement();
    if (top == null ||
  ! "stylesheet".equals(getXslLocal(top)) &&
  ! "transform".equals(getXslLocal(top))) {
      throw error("imported stylesheet `" + href +
      "' missing xsl:stylesheet.");
    }

    int oldMinImportance = _minImportance;
    Path oldContext = _context;
    Path virtualPath = _context.getParent().lookup(href);
    _context = virtualPath;
    _minImportance = _importance;
    boolean oldTop = _isTop;
    boolean oldRaw = _isRawText;
    _isTop = false;
    _isRawText = false;
   
    String systemId = top.getBaseURI();

    if (systemId != null)
      _context = _context.lookup(systemId);
   
    XslStylesheet stylesheet = (XslStylesheet) createChild(top);
View Full Code Here

Examples of com.caucho.xml.QElement

    throws Exception
  {
    if (! (element instanceof QElement))
      return;
   
    QElement elt = (QElement) element;
    String stylesheetPrefix;
    String resultPrefix;

    stylesheetPrefix = (String) element.getAttribute("stylesheet-prefix");
    resultPrefix = (String) element.getAttribute("result-prefix");
View Full Code Here

Examples of com.caucho.xml.QElement

  }

  private void generateApplyTemplates(Node node)
    throws Exception
  {
    QElement element = (QElement) node;
    String select = element.getAttribute("select");
    String mode = element.getAttribute("mode");
    AbstractPattern selectPattern = null;
    if (! select.equals(""))
      selectPattern = parseSelect(select, node);

    Sort []sort = generateSort(node);
View Full Code Here

Examples of com.caucho.xml.QElement

  }

  private void generateApplyImports(Node node)
    throws Exception
  {
    QElement element = (QElement) node;
    String mode = element.getAttribute("mode");

    if (element.getFirstChild() != null)
      throw error(L.l("xsl:apply-imports must be empty"));

    pushCall();
    generateArgs(element);
    printApplyImports(mode, _minImportance, _importance);
View Full Code Here

Examples of com.caucho.xml.QElement

  }

  private void generateMacro(Element element)
    throws Exception
  {
    QElement elt = (QElement) element;

    String name = element.getNodeName();
    String mode = element.getAttribute("mode");

    pushCall();
    for (Node node = elt.getFirstAttribute();
   node != null;
   node = node.getNextSibling()) {
      String argName = node.getNodeName();
      String argValue = node.getNodeValue();
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.