users@jaxb.java.net

RE: problem about xs:choice

From: Kevin Jones <kevinj_at_develop.com>
Date: Thu, 4 Dec 2003 13:28:50 -0000

Your schema element needs to look something like this

<xsd:schema xmlns:xsd='http://www.w3.org/2001/XMLSchema'
    targetNamespace="someuri"
    xmlns:tns="someuri"
    xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
    jaxb:version="1.0">

This defines the jaxb namespace and specifies the version being used.
You can then use jaxb customizations inline.


Kevin Jones
http://kevinj.develop.com

-----Original Message-----
From: Amila Suriarachchi [mailto:amilas_at_eurocenter.lk]
Sent: 04 December 2003 11:15
To: users_at_jaxb.dev.java.net
Subject: problem about xs:choice


i used this simple schema
 
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
      <xs:element name="Timing">
            <xs:complexType>
                  <xs:choice>
                        <xs:annotation>
                              <xs:appinfo>
                                    <jaxb:property name="Content"/>
                              </xs:appinfo>
                        </xs:annotation>
                        <xs:element name="Daily" type="xs:string"/>
                        <xs:element name="monthly" type="xs:string"/>
                        <xs:element name="yearly" type="xs:string"/>
                        <xs:element name="weekly" type="xs:string"/>
                  </xs:choice>
            </xs:complexType>
      </xs:element>
</xs:schema>
 
 
but I gives a compile error like this
[ERROR] The prefix "jaxb" for element "jaxb:property" is not bound.
  line 8 of testbinding.xsd


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net