users@jaxb.java.net

how to I set up my xjb file so that my editor will validate?

From: Andy Davidson <andy_davidson_at_apple.com>
Date: Mon, 31 Jan 2011 12:31:53 -0800

Hi

I am in the process of moving my xjc extensions out of my xsd files. I use eclipse as my xml editor. Any idea how I set up my xjb file so that the editor will catch errors?

thanks

Andy

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<jaxb:bindings version="2.0"
        xmlns:jaxb="http://java.sun.com/xml/ns/jaxb"
        xmlns:xjc="http://java.sun.com/xml/ns/jaxb/xjc"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"

        xs:schemaLocation="http://www.w3.org/2001/XMLSchema http://www.w3.org/2001/xml.xsd
                        http://java.sun.com/xml/ns/jaxb http://java.sun.com/xml/ns/jaxb/bindingschema_2_0.xsd
                        http://java.sun.com/xml/ns/jaxb/xjc http://java.sun.com/xml/ns/jaxb/xjc"

        jaxb:extensionBindingPrefixes="xjc">

        <jaxb:globalBindings>
                <xjc:simple />
                <xjc:serializable uid="-1" />
                <jaxb:javaType name="java.util.Calendar" xmlType="xs:dateTime"
                        parseMethod="javax.xml.bind.DatatypeConverter.parseDateTime"
                        printMethod="javax.xml.bind.DatatypeConverter.printDateTime" />
        </jaxb:globalBindings>

        <foo>how do I set up this file so that my editor will validate</foo>
</jaxb:bindings>