Jump to content

XML from XML schema


kneffelken

Recommended Posts

Dear,

I have to make a XML to be sent to the government for submitting taxes.
I got a schema how the xml has to look like.
now, the validation tool from the government sais that there is invalid content starting with the element VATNumber. (See attachment)
I only have 1 element called VATNumber.
my xml looks like this.
<?xml version="1.0" encoding="ISO-8859-1"?>
<ClientListingConsignment xmlns:iso="http://www.minfin.fgov.be/IsoTypes" xmlns:common="http://www.minfin.fgov.be/InputCommon" xmlns="http://www.minfin.fgov.be/ClientListingConsignment" ClientListingsNbr="1
<RepresentativeReference>AAD 2014</RepresentativeReference>
<ClientListing VATAmountSum="2608073.87" TurnOverSum="12555542.70" DeclarantReference="6376290" ClientsNbr="31" SequenceNumber="1">
<ReplacedClientListing>1-0403045292-201300</ReplacedClientListing>
<Declarant>
<VATNumber>0412501292</VATNumber>
<Name>ALL</Name>
<Street>A STOCLN 87</Street>
<PostCode>270</PostCode>
<City>DUF</City>
<CountryCode>BE</CountryCode>
<EmailAddress>Tom@all.com</EmailAddress>
<Phone>003215302882</Phone>
</Declarant>
</ClientListing>
</ClientListingConsignment>
now the xsd sais this:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.minfin.fgov.be/ClientListingConsignment" xmlns:iso="http://www.minfin.fgov.be/IsoTypes" xmlns:common="http://www.minfin.fgov.be/InputCommon" targetNamespace="http://www.minfin.fgov.be/ClientListingConsignment" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.0" xml:lang="en">
<xs:import namespace="http://www.minfin.fgov.be/InputCommon" schemaLocation="IntervatInputCommon_v0_7.xsd"/>
<xs:import namespace="http://www.minfin.fgov.be/IsoTypes" schemaLocation="IntervatIsoTypes_v0_7.xsd"/>
<!-- Root Element -->
<xs:element name="ClientListingConsignment">
<xs:annotation>
<xs:documentation xml:lang="fr">Envoi regroupé de listings clients, déposé par un mandataire</xs:documentation>
<xs:documentation xml:lang="nl">Gegroepeerde verzending van klantenlistings, voorgelegd door een gevolmachtigde</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="Representative" type="common:Representative_Type" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="fr">Mandataire</xs:documentation>
<xs:documentation xml:lang="nl">Gevolmachtigde</xs:documentation>
<xs:documentation xml:lang="de">Bevollmächtigter</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="RepresentativeReference" type="common:RepresentativeReference_Type" minOccurs="0">
<xs:annotation>
<xs:documentation>Référence attribuée à l'envoi par le mandataire</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="ClientListing" type="ClientListing_Type" maxOccurs="unbounded">
<xs:annotation>
<xs:documentation xml:lang="fr">Listing clients, pour un déclarant et une année</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="ClientListingsNbr" type="xs:positiveInteger" use="required">
<xs:annotation>
<xs:documentation xml:lang="fr">Nombre de listings clients dans l'envoi</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:element>
<xs:complexType name="ClientListing_Type">
<xs:annotation>
<xs:documentation xml:lang="fr">Lisintg clients, pour un déclarant et une année</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="ReplacedClientListing" type="common:IntervatDeclarationReference_Type" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="fr">Identifiant/Référence Intervat d'un listing clients précédent qui est remplacé par ce listing (référence donnée dans l'accusé de réception du listing original)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Declarant" type="common:Declarant_Type">
<xs:annotation>
<xs:documentation xml:lang="fr">Déclarant (assujetti belge)</xs:documentation>
<xs:documentation xml:lang="nl">Aangever (Belgische belastingplichtige)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
<xs:attribute name="SequenceNumber" type="xs:positiveInteger" use="required">
<xs:annotation>
<xs:documentation xml:lang="fr">Numéro de séquence du listing dans l'envoi</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="ClientsNbr" type="xs:unsignedInt" use="required">
<xs:annotation>
<xs:documentation>Nombre de clients dans le listing</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="DeclarantReference" type="common:DeclarantReference_Type">
<xs:annotation>
<xs:documentation xml:lang="fr">Référence attribuée à ce listing clients par le déclarant ou mandataire.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="TurnOverSum" type="common:UnlimitedSignedAmount_Type" use="required">
<xs:annotation>
<xs:documentation>Somme des chiffres d'affaires (hors TVA) pour tous les clients. Montant signé exprimé en EUR à l'eurocent près.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="VATAmountSum" type="common:UnlimitedSignedAmount_Type" use="required">
<xs:annotation>
<xs:documentation>Somme des montants TVA pour tous les clients. Montant signé exprimé en EUR à l'eurocent près.</xs:documentation>
</xs:annotation>
</xs:attribute>
</xs:complexType>
</xs:schema>
then in the common schema. there is a declarant type
<xs:complexType name="Declarant_Type">
<xs:annotation>
<xs:documentation xml:lang="fr">Déclarant d'un envoi de type TVA, listing clients, relevé intracommunautaire.</xs:documentation>
</xs:annotation>
<xs:sequence>
<xs:element name="VATNumber" type="BEVATNumber">
<xs:annotation>
<xs:documentation xml:lang="fr">Numéro de TVA de l'assujetti (numéro de TVA belge sans "BE")</xs:documentation>
<xs:documentation xml:lang="nl">Btw-nummer van de belastingplichtige</xs:documentation>
<xs:documentation xml:lang="de">MwSt.-Nr. des Steuerpflichtigen</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Name" type="Name_Type" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="fr">Nom</xs:documentation>
<xs:documentation xml:lang="nl">Naam</xs:documentation>
<xs:documentation xml:lang="de">Name</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Street" type="Street_Type" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="fr">Rue et numéro</xs:documentation>
<xs:documentation xml:lang="nl">Straat en nummer</xs:documentation>
<xs:documentation xml:lang="de">Straße</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="PostCode" type="PostCode_Type" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="fr">Code postal</xs:documentation>
<xs:documentation xml:lang="nl">Postcode</xs:documentation>
<xs:documentation xml:lang="de">Postleitzahl</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="City" type="City_Type" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="fr">Localité</xs:documentation>
<xs:documentation xml:lang="nl">Gemeente</xs:documentation>
<xs:documentation xml:lang="de">Ortschaft</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CountryCode" type="iso:MSCountryCode" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="fr">Pays de l'adresse</xs:documentation>
<xs:documentation xml:lang="nl">Land van het adres</xs:documentation>
<xs:documentation xml:lang="de">Land</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="EmailAddress" type="EMail_Type" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="fr">Adresse e-mail</xs:documentation>
<xs:documentation xml:lang="nl">E-mail adres</xs:documentation>
<xs:documentation xml:lang="de">E-Mail-Adresse</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Phone" type="cm:PhoneNumber_Type" minOccurs="0">
<xs:annotation>
<xs:documentation xml:lang="fr">Numéro de téléphone</xs:documentation>
<xs:documentation xml:lang="nl">Telefoon nummer</xs:documentation>
<xs:documentation xml:lang="de">Telefoon nummer</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
and if i check the BEVATNumber, i see a string type, 10 numbers into charachter format.
<xs:simpleType name="BEVATNumber"> <xs:restriction base="xs:string"> <xs:pattern value="[0-9]{10}"/> </xs:restriction> </xs:simpleType>
so what am i doing wrong.
I am filling a number of 10 characters long but he is going crazy about the fact that it is a number? and feels like its an integer?
any idea?
thanks in advance,
Sandra

post-182321-0-78216700-1427098616_thumb.jpg

Edited by kneffelken
Link to comment
Share on other sites

  • 2 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...