We do have several tests for using SCD in the external binding file. The
error seems to be a bug in the validation --- there certailny is no
element declaration for <hj:table>, and it's meant to be skipped.
Can you run XJC with -mode forest? That might give me some info. Also
does -nv makes any difference?
Aleksei Valikov wrote:
> Hi.
>
> I'm trying to use SCD to attach my own customization elements to classes and
> properties.
>
> This works:
>
> <jaxb:bindings schemaLocation="schema.xsd" node="/xs:schema">
> <jaxb:bindings node="xs:complexType[@name='PurchaseOrderType']"-->
> <hj:table name="po"/>
> </jaxb:bindings>
> </jaxb:bindings>
>
>
> This does not:
>
> <jaxb:bindings scd="x-schema::">
> <jaxb:bindings scd="~PurchaseOrderType">
> <hj:table name="po"/>
> </jaxb:bindings>
> </jaxb:bindings>
>
>
> I get:
>
> [error] XJC while parsing schema(s)
> file:/.../src/main/resources/bindings.xjb[13,25]:
> org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of
> element 'hj:table'.
>
> Any ideas why and what can be done? I'd teally love to use the SCD.
>
> Bye.
> /lexi
>
--
Kohsuke Kawaguchi
Sun Microsystems kohsuke.kawaguchi_at_sun.com