Question

Does JAXP 1.2 validate correctly?

Asked by: DigCamara

I am using JAXP 1.2 to validate my XML files. However, recently I have come to question its validation.

I compared the results of validating this XM with this XSD using the SAXLocalNameCount tutorial example and this site: http://apps.gotdotnet.com/xmltools/xsdvalidator/Default.aspx . The Java SAXLocalNameCount sample doesn't detect errors, the site, however does detect 2 (which is
the correct behavior). Do I have to specify some other version of JAXP ? Do I have to set some validating "strictness"?

Thanks for your help

XML FILE:

<!-- edited by Ricardo Cámara (Comisión Nacional Bancaria y de Valores) --><!--Definicion de un XML con datos en blanco--><!--Datos que identifican de manera unica el documento (mismos que se utilizan en su estructura de directorio)--><datos_xml>
<identifica anio="2013" id_doc="29" institucion="999" periodo="277" version_doc="1"/>
<encabezado clave_de_la_sociedad="ING-IPC" fecha="14072005" informacion_financiera="D">
<anexo18 cons_det_ref="600010" importes="0" porcentaje="0000.000" precio="0000000.000000" renglon="2001" serie="B      " titulos="0"/>
<anexo18 cons_det_ref="600020" importes="0" porcentaje="000.000" precio="0000000.000000" renglon="2002" serie="B      " titulos="0"/>
<anexo18 cons_det_ref="600011" importes="0" porcentaje="000.000" precio="0000002.417723" renglon="2003" serie="B      " titulos="0"/>
<anexo18 cons_det_ref="600021" importes="0" porcentaje="000.000" precio="0000002.417723" renglon="2004" serie="B      " titulos="0"/>
</encabezado>
</datos_xml>

Schema:

<!-- edited by Ricardo Cámara (Comisión Nacional Bancaria y de Valores) -->
<xs:schema elementFormDefault="qualified"
      xmlns:xs="http://www.w3.org/2001/XMLSchema">
      <xs:element name="anexo">
            <xs:complexType>
                  <xs:attribute name="renglon" type="xs:int" use="required" />
            </xs:complexType>
      </xs:element>
                              <xs:element name="anexo1" >
                              <xs:complexType>
                                    <xs:attribute name="renglon" type="xs:int" use="required"/>
                                    <xs:attribute name="diversificada_o_especializada" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="2"/>
                                                      <xs:pattern value="D |E | D| E"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipificacion" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="cuenta_completa" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="saldo" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                              </xs:complexType>
                        </xs:element>
                        <xs:element name="anexo2" >
                              <xs:complexType>
                                    <xs:attribute name="renglon" type="xs:int" use="required"/>
                                    <xs:attribute name="diversificada_o_especializada" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="2"/>
                                                      <xs:pattern value="D |E | D| E"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipificacion" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="cons_cartera" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipo_inv" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="1"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="emisora">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="serie">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tv" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="4"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tasa_valuar" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipo_tasa">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="2"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="calificacion_anx">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="10"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_titulos" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="costo_unit" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="13"/>
                                                      <xs:fractionDigits value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="costo_tot" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="val_mkdo_unit" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="13"/>
                                                      <xs:fractionDigits value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="val_mkdo_tot" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="dias_x_ven" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tot_titulos_emision" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="det_diaria">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="1"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="det_mensual">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="1"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="cve_empresa">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="cve_gpo_empresa">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="cve_agrup">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="cupon">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="isin">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="16"/>
                                                      <xs:pattern value=" {0,4}([A-Z]{2}([A-Z]|[0-9]){9}[0-9]{1} {0,4})| {16}"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pais_isin">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="2"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                              </xs:complexType>
                        </xs:element>
                        <xs:element name="anexo3" >
                              <xs:complexType>
                                    <xs:attribute name="renglon" type="xs:int" use="required"/>
                                    <xs:attribute name="cons_det_par" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pct" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pesos" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="18"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                              </xs:complexType>
                        </xs:element>
                        <xs:element name="anexo4">
                              <xs:complexType>
                                    <xs:attribute name="renglon" type="xs:int" use="required"/>
                                    <xs:attribute name="cons_compra_vta" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipo_inv" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="1"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="emisora">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="serie">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tv">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="4"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_titulos" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="costo_unit" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="13"/>
                                                      <xs:fractionDigits value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="int_liq" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="13"/>
                                                      <xs:fractionDigits value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipo_liq">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="2"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tasa_valuar" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipo_tasa">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="2"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="dias_x_ven" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pzo" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="ref_reporto">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="f_operacion">
                                          <xs:simpleType>
                                                <xs:restriction base="fecha"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="comision_liq">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="18"/>
                                                      <xs:fractionDigits value="0"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="iva_comision">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="18"/>
                                                      <xs:fractionDigits value="0"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="cupon">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="isin">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="16"/>
                                                      <xs:pattern value=" {0,4}([A-Z]{2}([A-Z]|[0-9]){9}[0-9]{1} {0,4})| {16}"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pais_isin">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="2"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="hora_compra_vta">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="contraparte">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="16"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                              </xs:complexType>
                        </xs:element>
                        <xs:element name="anexo5" >
                              <xs:complexType>
                                    <xs:attribute name="renglon" type="xs:int" use="required"/>
                                    <xs:attribute name="cons_param" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipo_inv">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="1"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="emisora">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="serie">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tv">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="4"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="saldo_mensual" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pct_act_tot" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pct_emision" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="isin">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="16"/>
                                                      <xs:pattern value=" {0,4}([A-Z]{2}([A-Z]|[0-9]){9}[0-9]{1} {0,4})| {16}"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                              </xs:complexType>
                        </xs:element>
                        <xs:element name="anexo7">
                              <xs:complexType>
                                    <xs:attribute name="renglon" type="xs:int" use="required"/>
                                    <xs:attribute name="cons_adquis_rep" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="prorroga">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="1"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="emisora">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="serie">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tv" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="4"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_titulos" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="imp_mkdo_tot" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="ref_reporto">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="reportada" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="dias_venc_rep" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pzo_tot" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tasa_premio" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="prec_pac" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="13"/>
                                                      <xs:fractionDigits value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="imp_pac" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="isin">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="16"/>
                                                      <xs:pattern value=" {0,4}([A-Z]{2}([A-Z]|[0-9]){9}[0-9]{1} {0,4})| {16}"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                              </xs:complexType>
                        </xs:element>
                        <xs:element name="anexo10" >
                              <xs:complexType>
                                    <xs:attribute name="renglon" type="xs:int" use="required"/>
                                    <xs:attribute name="cons_val_prestados" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="prorroga">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="1"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="emisora">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="serie">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tv" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="4"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="calificacion_anx">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="10"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_titulos_prestados" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="dias_x_ven" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_acta_prestamo" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="12"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="premio" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="f_ini_prestamo" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="fecha"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="f_fin_prestamo" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="fecha"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_prorroga">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="12"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="emisora_gar" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="serie_gar" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tv_gar" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="4"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="calificacion_gar">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="10"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_titulos_gar" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="imp_gar" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pct_pres_cartera" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="isin_pres">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="16"/>
                                                      <xs:pattern value=" {0,4}([A-Z]{2}([A-Z]|[0-9]){9}[0-9]{1} {0,4})| {16}"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="isin_rec">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="16"/>
                                                      <xs:pattern value=" {0,4}([A-Z]{2}([A-Z]|[0-9]){9}[0-9]{1} {0,4})| {16}"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                              </xs:complexType>
                        </xs:element>
                        <xs:element name="anexo13" >
                              <xs:complexType>
                                    <xs:attribute name="renglon" type="xs:int" use="required"/>
                                    <xs:attribute name="cons_estruc_acc" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="id_grupo">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="4"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="nombre">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="60"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="puesto">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="60"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="profesion">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="30"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_reg_shcp">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="8"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipo_asamblea">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="18"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="f_asamblea" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="fecha"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipo_poder">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="4"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_acc" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="serie">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="val_nom" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="18"/>
                                                      <xs:fractionDigits value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="imp_tot" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pct_min_fij" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pct_tot_circ" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="f_ini_mod">
                                          <xs:simpleType>
                                                <xs:restriction base="fecha"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                              </xs:complexType>
                        </xs:element>
                        <xs:element name="anexo14" >
                              <xs:complexType>
                                    <xs:attribute name="renglon" type="xs:int" use="required"/>
                                    <xs:attribute name="cons_provis_int" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipo_inv" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="1"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="emisora">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="serie">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tv">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="4"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_titulos" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_cupon" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_per" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="f_ini_per" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="fecha"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="f_fin_per" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="fecha"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="num_dias_per" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="val_nom_ajus" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="18"/>
                                                      <xs:fractionDigits value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="val_nom_calc" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="18"/>
                                                      <xs:fractionDigits value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tasa_int" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipo_tasa">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="2"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="inflacion" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="18"/>
                                                      <xs:fractionDigits value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="imp_mkdo" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="18"/>
                                                      <xs:fractionDigits value="6"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="int_devengados" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                              </xs:complexType>
                        </xs:element>
                        <xs:element name="anexo16" >
                              <xs:complexType>
                                    <xs:attribute name="renglon" type="xs:int" use="required"/>
                                    <xs:attribute name="cons_agrup" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tipo_inv" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="1"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="emisora" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="serie">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="tv">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="4"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pct">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="cons_agrup_par">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer"/>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="cve_empresa">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="cve_grupo_emp">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="param_obt">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="fuente_param">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pct_param_min">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="pct_param_max">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="mot_exc_insuf">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="5"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="exc_insuf">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6"/>
                                                      <xs:fractionDigits value="3"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="isin">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="16"/>
                                                      <xs:pattern value=" {0,4}([A-Z]{2}([A-Z]|[0-9]){9}[0-9]{1} {0,4})| {16}"/>
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                              </xs:complexType>
                        </xs:element>
                        <xs:element name="anexo18" >
                              <xs:complexType>
                                    <xs:attribute name="renglon" type="xs:int"
                                          use="required" />
                                    <xs:attribute name="serie">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:string">
                                                      <xs:maxLength value="7" />
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="cons_det_ref"
                                          use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer" />
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="porcentaje"
                                          use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="6" />
                                                      <xs:fractionDigits value="3" />
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="importes" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer" />
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="titulos" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:integer" />
                                          </xs:simpleType>
                                    </xs:attribute>
                                    <xs:attribute name="precio" use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:totalDigits value="13" />
                                                      <xs:fractionDigits value="6" />
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>
                              </xs:complexType>
                        </xs:element>
                        <!--Elemento al que se van a agregar todos los elementos que no formen parte del header-->
      <!--Elemento al que se van a agregar todos los elementos header-->
      <xs:element name="datos_xml">
            <xs:complexType>
                  <xs:sequence maxOccurs="1" minOccurs="1">
                        <xs:element ref="identifica" maxOccurs="1" minOccurs="1"/>
                        <xs:element ref="encabezado" maxOccurs="unbounded"
                              minOccurs="1">
                        </xs:element>
                  </xs:sequence>
            </xs:complexType>
      </xs:element>
      <xs:element name="identifica">
            <xs:complexType>
                  <xs:attribute name="anio" type="xs:gYear" use="required" />
                  <xs:attribute name="id_doc" type="xs:int" use="required" />
                  <xs:attribute name="institucion" use="required">
                        <xs:simpleType>
                              <xs:restriction base="xs:positiveInteger">
                                    <xs:minInclusive value="1" />
                                    <xs:maxInclusive value="999999" />
                              </xs:restriction>
                        </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="periodo" use="required">
                        <xs:simpleType>
                              <xs:restriction base="xs:int">
                                    <xs:totalDigits value="8" />
                                    <xs:minInclusive value="1" />
                                    <xs:maxInclusive value="32767" />
                              </xs:restriction>
                        </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="version_doc" type="xs:byte"
                        use="required" />
            </xs:complexType>
      </xs:element>
      <xs:simpleType name="fecha">
            <xs:annotation>
                  <xs:documentation>
                        Contiene la validación para fechas CCYYMMDD
                  </xs:documentation>
            </xs:annotation>
            <xs:restriction base="xs:string">
                  <xs:pattern
                        value="((0?[1-9])|(1[0-9])|(2[0-8]))((0?[1-9])|(1[0-2]))(((20)|(21)|(19))[0-9]{2})" />
                  <xs:pattern
                        value="((29)|(30))((0?(1|[3-9]))|(1[0-2]))(((20)|(21)|(19))[0-9]{2})" />
                  <xs:pattern
                        value="31((01|03|05|07|08|10|12))(((20)|(21)|(19))[0-9]{2})" />
                  <xs:pattern
                        value="(29)(0?2)(((20)|(21)|(19))(04|08|12|16|20|24|28|32|36|40|44|48|52|56|60|64|68|72|76|80|84|88|92|96))" />
                  <xs:pattern value="29022000" />
                  <xs:pattern value="        " />
            </xs:restriction>
      </xs:simpleType>
      <xs:element name="encabezado">

            <xs:complexType>
            
                  <xs:sequence minOccurs="1">
                        <xs:group ref="anexosObligados"></xs:group>
                        <xs:group ref="anexosOpcionales"></xs:group>
                  </xs:sequence>
                  <xs:attribute name="clave_de_la_sociedad" use="required">
                        <xs:simpleType>
                              <xs:restriction base="xs:string">
                                    <xs:maxLength value="7"/>
                              </xs:restriction>
                        </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="informacion_financiera" use="required">
                        <xs:simpleType>
                              <xs:restriction base="xs:string">
                                    <xs:maxLength value="1"/>
                                    <xs:pattern value="D"/>
                              </xs:restriction>
                        </xs:simpleType>
                  </xs:attribute>
                  <xs:attribute name="fecha" use="required">
                        <xs:simpleType>
                              <xs:restriction base="fecha"/>
                        </xs:simpleType>
                  </xs:attribute>
            </xs:complexType>
            
      </xs:element>

      <xs:group name="anexosObligados">
            <xs:sequence>
                  <xs:choice minOccurs="2" maxOccurs="2">
                        <xs:choice minOccurs="1" maxOccurs="unbounded">
                              <xs:element ref="anexo1" minOccurs="1"></xs:element>
                        </xs:choice>
                        <xs:choice maxOccurs="unbounded" minOccurs="1">
                              <xs:element ref="anexo18" minOccurs="1"></xs:element>
                        </xs:choice>
                  </xs:choice>
            </xs:sequence>
      </xs:group>

      <xs:group name="anexosOpcionales">
            <xs:sequence>
                  <xs:choice maxOccurs="unbounded" minOccurs="0">
                        <xs:choice maxOccurs="unbounded" minOccurs="0">
                              <xs:element ref="anexo3"></xs:element>
                        </xs:choice>

                  </xs:choice>
            </xs:sequence>
      </xs:group>

</xs:schema>

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2005-10-10 at 12:55:48ID21590076
Tags

jaxp

,

type

,

value

Topics

Java Programming Language

,

JAXP & SAX (XML APIs)

,

Extensible HTML (XHTML)

Participating Experts
2
Points
0
Comments
11

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. JAXP XML Problem.
    hello folks, I get this error com.ms.security.SecurityExceptionEx[javax/xml/parsers/DocumentBuilderFactory.newInstance]: Unable to access system property: javax.xml.parsers.DocumentBuilderFactory at com/ms/security/permissions/PropertyPermission.check at com/ms/s...
  2. JAXP XPath
    Hi, I am struggling to find a microsoft equivalent of selectNodes and selectSingleNode in the JAXP heirarchy. How do sun suggest one does xpath queries using their JAXP api. Regards Craig.
  3. JAXP XML Creation with schema info
    I'm creating some XML programmatically using JAXP to populate a DOM tree and then using Transofration to dump the information to XML. My problem is that though I have validation and namespacing turned on, it does not appear in the XML. What I need the XML to look like (root...
  4. Does XML/SAX/JAXP guarantees order of elements?
    hi all, I have an XML file used for configuration purposes. I have a tree and in it nodes. The order of the nodes is important and must be kept. It looks like that: <root> <tree> <nodes ids="theFirstNode,theSecondNode,theThirdNode"/> ...

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: matthewdflemingPosted on 2005-10-11 at 13:22:53ID: 15064205

Did you try this? http://xml.apache.org/xerces2-j/faq-pcfp.html (How can I tell the parser to validate against XML Schema and not to report DTD validation errors?)

It has examples for both JAXP 1.2 and 1.3

 

by: DigCamaraPosted on 2005-10-11 at 14:26:01ID: 15064705

Actually, there is no dtd involved.

The code I use is very similar to that of the link; however I am not even using my own code in the problem I am posting. I am using a sample included with the JAVAX SDK; the validation results I post are from that sample. And, like I posted, the .NET site finds 2 validation errors, the Java sample finds none.

 

by: matthewdflemingPosted on 2005-10-11 at 14:33:11ID: 15064751

the link I posted shows how to enable validation for a schema not a DTD.. The point of the link is to show how to enable validation for JAXP in your code (you may have to mod the example).  Are you saying that the parser in the code you are testing is configured the same as in the link?  If not, the the jaxp parser is not set to validate the xml and thus no errors.

 

by: DigCamaraPosted on 2005-10-12 at 15:55:00ID: 15073440

Actuallly, what I am saying is I am not even using my own code to verify the validation JAXP performs. The class I am using is SAXLocalNameCount  which is included in this sample package:

http://java.sun.com/webservices/docs/1.6/jaxp/samples.html

When I use said class, I don't get the expected validation errors, which I do get on the .NET site.

According to the documentation:

The SAXLocalNameCount program counts the number of unique element local names in an XML document, ignoring the namespace name for simplicity. This example also shows one way to turn on DTD or XSD validation. Using a different XSD/XML combo I obtain (correctly) this message:

org.xml.sax.SAXException: Error: URI=file:/E:/Documents%20and%20Settings/ID00242
9/Mis%20documentos/java/eclipse/workspace/tutorial/bin/sample3.xml Line=14: cvc-
maxInclusive-valid: Value '100' is not facet-valid with respect to maxInclusive
'20' for type 'null'.
        at SAXLocalNameCount$MyErrorHandler.error(SAXLocalNameCount.java:281)



 

by: matthewdflemingPosted on 2005-10-12 at 21:36:30ID: 15074647

>> I am not even using my own code to verify the validation JAXP performs

Ok but you certainly can modify the class before you run it right?  I looked at the class in question and it looks like it is configured properly.. how are you running the example? Are you running with -xsdss filename.xsd? What happens when you run the SchemaValidator example does it work?  

 

by: DigCamaraPosted on 2005-10-13 at 08:48:59ID: 15078194

I'm running it like this:
java SAXLocalNameCount -xsdss Valida29.1.xsd SI250705.183339.result2.xml

Like I posted before, I validated my schema using http://apps.gotdotnet.com/xmltools/xsdvalidator/Default.aspx , and it seems to check out OK.

In the meantime, I changed the Schema  at the
 <xs:attribute name="porcentaje"
                                   use="required">
                                   <xs:simpleType>
                                        <xs:restriction base="xs:decimal">
                                             <xs:totalDigits value="6" />
                                             <xs:fractionDigits value="3" />
                                        </xs:restriction>
                                   </xs:simpleType>
                              </xs:attribute>

to include a restriction like this:

<xs:attribute name="porcentaje"
                                          use="required">
                                          <xs:simpleType>
                                                <xs:restriction base="xs:decimal">
                                                      <xs:minInclusive value="1"/>
                                                      <xs:maxInclusive value="20"/>
                                                      <xs:totalDigits value="6" />
                                                      <xs:fractionDigits value="3" />
                                                </xs:restriction>
                                          </xs:simpleType>
                                    </xs:attribute>

When I validate it using the sample class, it throws this output:

 Line=4: cvc-minInclusive-valid: Value '0000.000' is not face
t-valid with respect to minInclusive '1.0' for type 'null'.
        at SAXLocalNameCount$MyErrorHandler.error(SAXLocalNameCount.java:281)

which is correct. However, it does not validate the size of the data (it's supposed to spot the excess 0 in 0000.000 )

I haven't used the SchemaValidator example, since it seems to be included in the JAXP 1.3 samples. I suppose it needs JAXP 1.3 to run.

 

by: matthewdflemingPosted on 2005-10-13 at 09:12:46ID: 15078468

In your first question post you said "The Java SAXLocalNameCount sample doesn't detect errors, the site, however does detect 2.." This isn't really the case?  The parser does detect the first error right?

So your question becomes "Does the SAX parser detect all errors at once or just one at a time?"  To answer that, all you need to do is check out the ErrorHandler inside the code.  It currently throws a SAXException (stopping processing) whenever any error or fatalError is found. Change the methods so that they don't throw a SAXException and instead do a out.println() and you should see all of the validation errors.

Check this out for some more insight into error handling: http://www-128.ibm.com/developerworks/xml/library/x-tipeh.html

 

by: DigCamaraPosted on 2005-10-13 at 09:19:16ID: 15078538

Like I posted: I CHANGED the Schema to verify the sample class detects anything AT ALL. As soon as I change it back, it does NOT detect ANY errors.

Even though the link is probably useful, it still doesn't explain why the sample class does NOT detect the extra 0 in the decimal number.

 

by: DigCamaraPosted on 2005-10-13 at 10:27:50ID: 15079236

The right answer (I just did some experimenting myself ) is:

the JAXP 1.2 parser does not report the error since it detects the non-significance of the extra 0. It would have reported an error as soon as it had detected an added significative digit. Additionally, using the schema I posted, correct values for
"porcentaje" include: 10000. ; 0.111 ; 111.111 ; 1111.11

 

by: Computer101Posted on 2006-01-02 at 05:46:20ID: 15591128

PAQed with points refunded (250)

Computer101
EE Admin

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...