Package org.apache.xerces.xs

Examples of org.apache.xerces.xs.ElementPSVI


    if (DEBUG_EVENTS) {
      System.out.println("==>endElement: " + element);
    }

        if(augs != null) {
        ElementPSVI elementPSVI = (ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI);
        if (elementPSVI != null) {
          ElementImpl elementNode = (ElementImpl) fCurrentNode;
          if (fPSVI) {
            ((PSVIElementNSImpl) fCurrentNode).setPSVI(elementPSVI);
          }
          // include element default content (if one is available)
          String normalizedValue = elementPSVI.getSchemaNormalizedValue();
          if ((fConfiguration.features & DOMConfigurationImpl.DTNORMALIZATION) != 0) {
                    if (normalizedValue !=null)
                elementNode.setTextContent(normalizedValue);
          }
          else {
View Full Code Here


    static void printUsage() {
        System.err.println("USAGE: java java.DatatypeInterfaceUsage <xsd file name (one only)> <xml file name(one only)>");
    }

    public void endElement(String uri, String localName, String qName) throws SAXException {
        ElementPSVI psvi = provider.getElementPSVI();
        if(psvi != null) {
            //If there was an element content
            Object value = psvi.getActualNormalizedValue();
            short type = psvi.getActualNormalizedValueType();
            if(value != null) {
                switch(type) {
                case XSConstants.INTEGER_DT:
                case XSConstants.DECIMAL_DT:
                case XSConstants.INT_DT:
View Full Code Here

      if(index == curIndex) {
        found = true;
      }
      curIndex ++;
     
      ElementPSVI psvi = provider.getElementPSVI();
      if(psvi != null) {
        XSTypeDefinition typeInfo = psvi.getTypeDefinition();

        while(typeInfo != null) {
          String typeName = typeInfo.getName();
          if(typeName != null &&(typeName.equals("long") ||
              typeName.equals("string") ||
View Full Code Here

                }
            }
            setCharacterData (false);
           
            if (augs != null) {
                ElementPSVI elementPSVI = (ElementPSVI)augs.getItem (Constants.ELEMENT_PSVI);
                if (elementPSVI != null && fNamespaceAware) {
                    XSTypeDefinition type = elementPSVI.getMemberTypeDefinition ();
                    if (type == null) {
                        type = elementPSVI.getTypeDefinition ();
                    }
                    ((ElementNSImpl)el).setType (type);
                }
            }
           
           
            // filter nodes
            if (fDOMFilter != null) {
                short code = fDOMFilter.startElement (el);
                switch (code) {
                    case LSParserFilter.FILTER_INTERRUPT:{
                        throw new RuntimeException ("The normal processing of the document was interrupted.");
                    }
                    case LSParserFilter.FILTER_REJECT:{
                        fFilterReject = true;
                        fRejectedElement.setValues (element);
                        return;
                    }
                    case LSParserFilter.FILTER_SKIP: {
                        fSkippedElemStack.push (element);
                        return;
                    }
                    default: {
                    }
                }
            }
           
            fCurrentNode.appendChild (el);
            fCurrentNode = el;
        }
        else {
            Object type = null;
            if (augs != null) {
                ElementPSVI elementPSVI = (ElementPSVI)augs.getItem (Constants.ELEMENT_PSVI);
                if (elementPSVI != null) {
                    type = elementPSVI.getMemberTypeDefinition ();
                    if (type == null) {
                        type = elementPSVI.getTypeDefinition ();
                    }
                }
            }
           
            int el =
View Full Code Here

        }
        if (!fDeferNodeExpansion) {
           
            // REVISIT: Should this happen after we call the filter?
            if (fStorePSVI && augs != null) {
                ElementPSVI elementPSVI = (ElementPSVI)augs.getItem (Constants.ELEMENT_PSVI);
                if (elementPSVI != null) {
                    ((PSVIElementNSImpl)fCurrentNode).setPSVI (elementPSVI);
                }
            }
           
View Full Code Here

                }
            }
            setCharacterData (false);
           
            if (augs != null) {
                ElementPSVI elementPSVI = (ElementPSVI)augs.getItem (Constants.ELEMENT_PSVI);
                if (elementPSVI != null && fNamespaceAware) {
                    XSTypeDefinition type = elementPSVI.getMemberTypeDefinition ();
                    if (type == null) {
                        type = elementPSVI.getTypeDefinition ();
                    }
                    ((ElementNSImpl)el).setType (type);
                }
            }
           
           
            // filter nodes
            if (fDOMFilter != null && !fInEntityRef) {
                if (fRoot.rawname == null) {
                    // fill value of the root element
                    fRoot.setValues(element);
                } else {
                    short code = fDOMFilter.startElement(el);
                    switch (code) {
                        case LSParserFilter.FILTER_INTERRUPT :
                            {
                                throw new RuntimeException("The normal processing of the document was interrupted.");
                            }
                        case LSParserFilter.FILTER_REJECT :
                            {
                                fFilterReject = true;
                                fRejectedElement.setValues(element);
                                return;
                            }
                        case LSParserFilter.FILTER_SKIP :
                            {
                                fSkippedElemStack.push(element);
                                return;
                            }
                        default : {}
                    }
                }
            }           
            fCurrentNode.appendChild (el);
            fCurrentNode = el;
        }
        else {
            Object type = null;
            if (augs != null) {
                ElementPSVI elementPSVI = (ElementPSVI)augs.getItem (Constants.ELEMENT_PSVI);
                if (elementPSVI != null) {
                    type = elementPSVI.getMemberTypeDefinition ();
                    if (type == null) {
                        type = elementPSVI.getTypeDefinition ();
                    }
                }
            }
           
            int el =
View Full Code Here

        }
        if (!fDeferNodeExpansion) {
           
            // REVISIT: Should this happen after we call the filter?
            if (fStorePSVI && augs != null) {
                ElementPSVI elementPSVI = (ElementPSVI)augs.getItem (Constants.ELEMENT_PSVI);
                if (elementPSVI != null) {
                    ((PSVIElementNSImpl)fCurrentNode).setPSVI (elementPSVI);
                }
            }
           
View Full Code Here

  public void endElement(QName element, Augmentations augs) throws XNIException {
    if (DEBUG_EVENTS) {
      System.out.println("==>endElement: " + element);
    }

    ElementPSVI elementPSVI = (ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI);
    if (elementPSVI != null) {
      ElementImpl elementNode = (ElementImpl) fCurrentNode;
      if (fPSVI) {
        ((PSVIElementNSImpl) fCurrentNode).setPSVI(elementPSVI);
      }
      // include element default content (if one is available)
      String normalizedValue = elementPSVI.getSchemaNormalizedValue();
      if ((fConfiguration.features & DOMConfigurationImpl.DTNORMALIZATION) != 0) {
                if (normalizedValue !=null)
            elementNode.setTextContent(normalizedValue);
      }
      else {
View Full Code Here

  public void endElement(QName element, Augmentations augs) throws XNIException {
    if (DEBUG_EVENTS) {
      System.out.println("==>endElement: " + element);
    }

    ElementPSVI elementPSVI = (ElementPSVI) augs.getItem(Constants.ELEMENT_PSVI);
    if (elementPSVI != null) {
      ElementImpl elementNode = (ElementImpl) fCurrentNode;
      if (fPSVI) {
        ((PSVIElementNSImpl) fCurrentNode).setPSVI(elementPSVI);
      }
      // include element default content (if one is available)
      String normalizedValue = elementPSVI.getSchemaNormalizedValue();
      if ((fConfiguration.features & DOMConfigurationImpl.DTNORMALIZATION) != 0) {
                if (normalizedValue !=null)
            elementNode.setTextContent(normalizedValue);
      }
      else {
View Full Code Here

    static void printUsage() {
        System.err.println("USAGE: java java.DatatypeInterfaceUsage <xsd file name (one only)> <xml file name(one only)>");
    }

    public void endElement(String uri, String localName, String qName) throws SAXException {
        ElementPSVI psvi = provider.getElementPSVI();
        if(psvi != null) {
            //If there was an element content
            Object value = psvi.getActualNormalizedValue();
            short type = psvi.getActualNormalizedValueType();
            if(value != null) {
                switch(type) {
                case XSConstants.INTEGER_DT:
                case XSConstants.DECIMAL_DT:
                case XSConstants.INT_DT:
View Full Code Here

TOP

Related Classes of org.apache.xerces.xs.ElementPSVI

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.