users@jaxb.java.net

[HJ3] Cannot attach annotations to 'ref' elements

From: Kostis Anagnostopoulos <ankostis_at_gmail.com>
Date: Thu, 25 Jan 2007 15:19:06 +0200

Hi to all,

it may be a jaxb-2.x problem but it still does botther me!

I have a schema like this:
  <xsd:complexType name="portsType">
    <xsd:sequence>
      <xsd:element ref="proci:problems" minOccurs="0" >
        <xsd:annotation>
          <xsd:appinfo>
            <hj:ignored/>
          </xsd:appinfo>
        </xsd:annotation>
      </xsd:element>
    </xsd:sequence>
  </xsd:complexType>

And the XJC complains:

[ERROR] XJC while parsing schema(s)
file:/home/kana/work/hyperjaxb3-hibernate-sample-0.1/src/main/resources/larysi.xsd[54,26]:
org.xml.sax.SAXParseException: The prefix "hj" for element
"hj:ignored" is not bound.


Any ideas why this happens?

Regards,
  Kostis