You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xerces.apache.org by sa...@daimlerchrysler.com on 2001/08/13 23:05:58 UTC

Schema Validation Error Using Xerces1.4 Parser

I am trying to validate a xml file using a schema. I am encountering some
problems. I am using the latest IBM Xerces Parser.
Details follow:


i get the following error message

"org.apache.xerces.validators.datatype.InvalidDatatypeFacetException:
Installation Problem???  Couldn't load messages: Can't find resource for
base name org.apache.xerces.utils.regex.message, locale en_US"

If I change the xmlns attribute to http://www.w3.org/2000/10/XMLSchema I
get a different error message.
General Schema error: uri http://localhost:8080/fnce/vcm/ not found


SCHEMA FILE:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
      targetNamespace = "http://localhost:8080/fnce/vcm"
      xmlns = "http://localhost:8080/fnce/vcm"
      elementFormDefault = "qualified"
      attributeFormDefault = "unqualified">

     <xsd:element name="stvXml">
          <xsd:complexType>
               <xsd:sequence>
                    <xsd:element ref = "VehclFamList" maxOccurs
="unbounded"/>
               </xsd:sequence>
          </xsd:complexType>
     </xsd:element>

     <xsd:element name = "VehclFamList">
          <xsd:complexType>
               <xsd:sequence>
                    <xsd:element name="c_fam" type = "xsd:string"/>
                    <xsd:element name="n_fam" type = "xsd:string"/>
               </xsd:sequence>
          </xsd:complexType>
     </xsd:element>

</xsd:schema>

------------------------------------------------------------------------------------------------------------------------------------------------------
XML FILE:

<?xml version="1.0" encoding="UTF-8" ?>
<stvXml xmlns="http://localhost:8080/fnce/vcm"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://localhost:8080/fnce/vcm
http://localhost:8080/fnce/vcm/vehiclefamily.xsd">

<VehclFamList>
<c_fam>
AB1
</c_fam>
<n_fam>
ABDESC1
</n_fam>
</VehclFamList>

<VehclFamList>
<c_fam>
AB2
</c_fam>
<n_fam>
ABDESC2
</n_fam>
</VehclFamList>

</stvXml>
------------------------------------------------------------------------------------------------------------------------------------------------------------




****************************************************************************

The information contained in this transmission, which may be
confidential and proprietary, is only for the intended recipients.
Unauthorized use is strictly prohibited. If you receive this
transmission in error, please notify me immediately by telephone
or electronic mail and confirm that you deleted this transmission
and the reply from your electronic mail system.
****************************************************************************




Re: Schema Validation Error Using Xerces1.4 Parser

Posted by r abiram <ab...@yahoo.com>.
Hi,
I have not worked with this problems can you tell me 
which Browser versions supports Schema 

Bye:

--- sa79@daimlerchrysler.com wrote:
> I am trying to validate a xml file using a schema. I
> am encountering some
> problems. I am using the latest IBM Xerces Parser.
> Details follow:
> 
> 
> i get the following error message
> 
>
"org.apache.xerces.validators.datatype.InvalidDatatypeFacetException:
> Installation Problem???  Couldn't load messages:
> Can't find resource for
> base name org.apache.xerces.utils.regex.message,
> locale en_US"
> 
> If I change the xmlns attribute to
> http://www.w3.org/2000/10/XMLSchema I
> get a different error message.
> General Schema error: uri
> http://localhost:8080/fnce/vcm/ not found
> 
> 
> SCHEMA FILE:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema xmlns:xsd =
> "http://www.w3.org/2001/XMLSchema"
>       targetNamespace =
> "http://localhost:8080/fnce/vcm"
>       xmlns = "http://localhost:8080/fnce/vcm"
>       elementFormDefault = "qualified"
>       attributeFormDefault = "unqualified">
> 
>      <xsd:element name="stvXml">
>           <xsd:complexType>
>                <xsd:sequence>
>                     <xsd:element ref =
> "VehclFamList" maxOccurs
> ="unbounded"/>
>                </xsd:sequence>
>           </xsd:complexType>
>      </xsd:element>
> 
>      <xsd:element name = "VehclFamList">
>           <xsd:complexType>
>                <xsd:sequence>
>                     <xsd:element name="c_fam" type =
> "xsd:string"/>
>                     <xsd:element name="n_fam" type =
> "xsd:string"/>
>                </xsd:sequence>
>           </xsd:complexType>
>      </xsd:element>
> 
> </xsd:schema>
> 
>
------------------------------------------------------------------------------------------------------------------------------------------------------
> XML FILE:
> 
> <?xml version="1.0" encoding="UTF-8" ?>
> <stvXml xmlns="http://localhost:8080/fnce/vcm"
> 
>
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>  xsi:schemaLocation="http://localhost:8080/fnce/vcm
> http://localhost:8080/fnce/vcm/vehiclefamily.xsd">
> 
> <VehclFamList>
> <c_fam>
> AB1
> </c_fam>
> <n_fam>
> ABDESC1
> </n_fam>
> </VehclFamList>
> 
> <VehclFamList>
> <c_fam>
> AB2
> </c_fam>
> <n_fam>
> ABDESC2
> </n_fam>
> </VehclFamList>
> 
> </stvXml>
>
------------------------------------------------------------------------------------------------------------------------------------------------------------
> 
> 
> 
> 
>
****************************************************************************
> 
> The information contained in this transmission,
> which may be
> confidential and proprietary, is only for the
> intended recipients.
> Unauthorized use is strictly prohibited. If you
> receive this
> transmission in error, please notify me immediately
> by telephone
> or electronic mail and confirm that you deleted this
> transmission
> and the reply from your electronic mail system.
>
****************************************************************************
> 
> 
> 


__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/