users@jaxb.java.net

Re: [WARNING] warning: "blockDefault" attribute of <schema> is not supported

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Wed, 6 May 2009 20:08:05 +0200

Olé!

Looking at the two lines flagged by the compiler shows you that both define
exactly the same type. This might be considered a design flaw of the schema,
albeit a small one. You have several options:

(1) Assuming that nothing from W3C is sacred, you could simply copy the
xenc-schema.xsd, remove the definition of TransformsType from
xenc-schema.xsd (lines 65-69) and replace the single occurrence of
"xenc:TransformsType" in that file by "ds:TransformsType". Then, compile
from your local copy.

(2) Consider using JAXB 2, where the schema compiler doesn't run into this
problem. (Why are you stuck with 1.0.1?) But the result isn't so attractive,
as you'll have two almost identical classes TransformsType, one in the
packages org.w3._2001._04.xmlenc_ and another one in
org.w3._2000._09.xmldsig_.

(3) Consult
https://jaxb.dev.java.net/tutorial/section_5_3-Overriding-Names.html#Overriding%20Names
to learn about customizing for overriding names as they are defined by
schemas. The examples there use inline customizations, to be added to the
schema file, but you'll find an example for external customization in
section 5.6. (I assume that internal and external customization work just
like that with JAXB 1.x, but I've not used this for a long time.)

HTH
-W


On Wed, May 6, 2009 at 3:52 PM, Sara Sánchez <sarasanchez1980_at_hotmail.es>wrote:

> ok!! i don't understand what -extension option means! now, yes. Thank you!
>
> when i use the extension option, my problem is different! (it is an
> advance!). I have it:
>
> [ERROR] A class/interface with the same name
> "es.upm.dit.liberty.wsp.jaxb.TransformsType" is already in use. Use a
> class customization to resolve this conflict.
> line 109 of xmldsig-core-schema.xsd
>
> [ERROR] (Relevant to above error) another "TransformsType" is generated
> from here.
> line 65 of xenc-schema.xsd
>
> [ERROR] A class/interface with the same name
> "es.upm.dit.liberty.wsp.jaxb.ReferenceType" is already in use. Use a
> class customization to resolve this conflict.
> line 97 of xmldsig-core-schema.xsd
>
> [ERROR] (Relevant to above error) another "ReferenceType" is generated from
> here.
> line 119 of xenc-schema.xsd
>
>
> So, i have to create a class customization to resolve this conflict. i
> don't know what it means, so if you can continue with you help, write an
> example,.. thank you!
>
> Sara
>
>
> ------------------------------
> Date: Wed, 6 May 2009 14:32:35 +0200
> From: wolfgang.laun_at_gmail.com
> To: users_at_jaxb.dev.java.net
> Subject: Re: FW: [WARNING] warning: "blockDefault" attribute of <schema> is
> not supported
>
>
> Two remarks.
>
> Neither "blockDefault" nor "finalDefault" occur in the original schemas
> (where <schema> is indeed in lines 17 and 32, respectively). But these are
> merely warnings and should not cause any problems.
>
> What happens if you call the schema compiler with the -extension option, as
> sugested?
>
> -W
>
>
> On Wed, May 6, 2009 at 1:07 PM, Sara Sánchez <sarasanchez1980_at_hotmail.es>wrote:
>
> Hi all,
>
> I have a problem when i try to parse my xsd with JAXB. I have to use the
> version 1.0.1.
>
> The error report that i obtain is:
>
> [WARNING] warning: "blockDefault" attribute of <schema> is not supported
> line 32 of xmldsig-core-schema.xsd
>
> [WARNING] warning: "finalDefault" attribute of <schema> is not supported
> line 32 of xmldsig-core-schema.xsd
>
> [WARNING] warning: "blockDefault" attribute of <schema> is not supported
> line 32 of xmldsig-core-schema.xsd
>
> [WARNING] warning: "finalDefault" attribute of <schema> is not supported
> line 32 of xmldsig-core-schema.xsd
>
> [WARNING] warning: "blockDefault" attribute of <schema> is not supported
> line 17 of xenc-schema.xsd
>
> [WARNING] warning: "finalDefault" attribute of <schema> is not supported
> line 17 of xenc-schema.xsd
>
> [WARNING] warning: "blockDefault" attribute of <schema> is not supported
> line 32 of xmldsig-core-schema.xsd
>
> [WARNING] warning: "finalDefault" attribute of <schema> is not supported
> line 32 of xmldsig-core-schema.xsd
>
> [ERROR] In "strict" mode, the following schema feature is not allowed (See
> App E.2). Use the "-extension" switch:
> <anyAttribute>
> line 142 of xenc-schema.xsd
>
> Failed to parse a schema.
>
>
> I don't know what it means and what i have do wrong in my xsd because the
> error report indicates that the problem is with xmldsig-core-schema.xsd,
> that is *
> http://www.w3.org/TR/2002/REC-xmldsig-core-20020212/xmldsig-core-schema.xsd
> *and it is a specification.
>
> I need to solve this soon, so any help/suggestion is very welcome
>
> Thanks,
>
> Sara
>
>
>
>
>
> ------------------------------
> Ahora, GRATIS Hotmail en tu móvil ¡Descúbrelo aquí!<http://serviciosmoviles.es.msn.com/hotmail.aspx>
> ------------------------------
> El nuevo Windows Live tiene mucho que ofrecerte. Descúbrelo en estos
> vídeos <http://www.windowslive.es>
>
>
>
> ------------------------------
> Haz búsquedas con Live Search, ¡todas tus búsquedas tienen premio!<http://www.buscalasuerte.com/>
>