![]() |
![]() | ![]() | ![]() | Altova Mailing List Archives>Archive Index >xmlschema-dev Archive Home >Recent entries >Thread Prev - RE: Imports do not seem to have any effect in validators. [Thread Next] Re: Imports do not seem to have any effect in validators.To: "Ortuzar San Vicente, Lander" <lortuzar@-----.--> Date: 5/9/2006 3:07:00 PM
Hi,
<xsd:element name="Header" minOccurs="1"/>
defines a Header element whose type is anyType, that means it accepts
anything inside it.
There is no magic that links the Header element from the
http://www.gal-gms-ete.esa.int/EFD namespace with the Header type from
the http://www.gal-gms-ete.esa.int namespace (not that namespace
matters, but you should be aware that you have two namespaces as your
instance documents do not show that. A valid instance document after you
set the type for the Header element looks like:
<?xml version="1.0" encoding="UTF-8"?>
<Body xmlns="http://www.gal-gms-ete.esa.int/EFD"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.gal-gms-ete.esa.int/EFD
EFDs_reduced.xsd">
<Header>
<OutputFilesNum
xmlns="http://www.gal-gms-ete.esa.int">1213</OutputFilesNum>
<SpareString2
xmlns="http://www.gal-gms-ete.esa.int">Spare_string_2</SpareString2>
</Header>
<Output>
<OutputFile>
<Name>aaaaaaa.sdc</Name>
<Path>dsds/dsds</Path>
</OutputFile>
</Output>
</Body>
Note the namespace declaration xmlns="http://www.gal-gms-ete.esa.int"
for the OutputFilesNum and SpareString2 elements.
Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
www.---.com
Ortuzar San Vicente, Lander wrote:
> Dear Florent,
>
> I attach you 2 XML with 2 schemas. The main schema is EFDs_reduced.xsd =
which imports Headers_reduced.xsd. One of the XML is correctly formatted =
and it validates as it is expected, but the other one misses one field in=
the Header, and the validators do not complain about that fact (although=
the schema which defines the Header tag is imported in the main one)
>
> The xml files are:
> 000sz06037i52RDEFD00000001_reduced.xml --> Correct
> 000sz06037i52RDEFD00000001_reduced_WRONG.xml --> Wrong (who would have =
guessed? ;-) )
>
> The schemas:
> EFDs_reduced.xsd (main)
> Headers_reduced.xsd (imported by main)
>
> The validators I've tried are:
>
> Xmllint with the following syntax:
>
>> xmllint -schema EFDs_reduced.xsd 000sz06037i52RDEFD00000001_reduced.xm=
l
>
> And Xsv with the following syntax:
>
>> xsv 000sz06037i52RDEFD00000001_reduced.xml
>
> Thanks in advance for your help,
>
> Lander Ortuzar.
>
> -----Mensaje original-----
> De: Florent Georges [mailto:darkman_spam@y...]
> Enviado el: lunes, 08 de mayo de 2006 23:33
> Para: Ortuzar San Vicente, Lander; xmlschema-dev@w...
> CC: Palenzuela Roses, Oriol
> Asunto: RE: Imports do not seem to have any effect in validators.
>
> "Ortuzar San Vicente, Lander" wrote:
>
>> It seems like I'm missing something important ;), so
>> please somebody help me, and tell me what to do to get
>> those imports to work properly.
>
> It's hard to help you without information. Can you please post a
> minimal schema + XML instance that reproduce the problem, as well as
> the commands you use to validate ?
>
> Regards,
>
> --drkm
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> =09
>
> =09
> =09
> _______________________________________________________________________=
____
> Faites de Yahoo! votre page d'accueil sur le web pour retrouver directe=
ment vos services pr=E9f=E9r=E9s : v=E9rifiez vos nouveaux mails, lancez =
vos recherches et suivez l'actualit=E9 en temps r=E9el.
> Rendez-vous sur http://fr.yahoo.com/set
From mike@s... Tue May 09 09:16:06 2006
Received: from lisa.w3.org ([128.30.52.41])
by frink.w3.org with esmtp (Exim 4.50)
id 1FdOK6-0006yr-6k
for xmls | ![]() | ![]() | ![]() |
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | |||||
|
