< prev index next >

src/java.xml.bind/share/classes/javax/xml/bind/annotation/XmlSchema.java

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this --- 1,7 ---- /* ! * Copyright (c) 2004, 2015, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. Oracle designates this
*** 53,80 **** * <li> JSR 175 recommends package-info.java for package level * annotations. JAXB Providers that follow this recommendation * will allow the package level annotations to be defined in * package-info.java. * </ul> - * <p> * * <p><b>Example 1:</b> Customize name of XML namespace to which * package is mapped.</p> * * <pre> * @javax.xml.bind.annotation.XmlSchema ( * namespace = "http://www.example.com/MYPO1" * ) * ! * &lt;!-- XML Schema fragment --> * &lt;schema * xmlns=... * xmlns:po=.... * targetNamespace="http://www.example.com/MYPO1" ! * > * &lt;!-- prefixes generated by default are implementation ! * depedenent --> * </pre> * * <p><b>Example 2:</b> Customize namespace prefix, namespace URI * mapping</p> * --- 53,79 ---- * <li> JSR 175 recommends package-info.java for package level * annotations. JAXB Providers that follow this recommendation * will allow the package level annotations to be defined in * package-info.java. * </ul> * * <p><b>Example 1:</b> Customize name of XML namespace to which * package is mapped.</p> * * <pre> * @javax.xml.bind.annotation.XmlSchema ( * namespace = "http://www.example.com/MYPO1" * ) * ! * &lt;!-- XML Schema fragment --&gt; * &lt;schema * xmlns=... * xmlns:po=.... * targetNamespace="http://www.example.com/MYPO1" ! * &gt; * &lt;!-- prefixes generated by default are implementation ! * depedenent --&gt; * </pre> * * <p><b>Example 2:</b> Customize namespace prefix, namespace URI * mapping</p> *
*** 88,117 **** * @javax.xml.bind.annotation.XmlNs(prefix="xs", * namespaceURI="http://www.w3.org/2001/XMLSchema") * ) * ) * ! * &lt;!-- XML Schema fragment --> * &lt;schema * xmlns:xs="http://www.w3.org/2001/XMLSchema" * xmlns:po="http://www.example.com/PO1" ! * targetNamespace="http://www.example.com/PO1"> * * </pre> * * <p><b>Example 3:</b> Customize elementFormDefault</p> * <pre> * @javax.xml.bind.annotation.XmlSchema ( * elementFormDefault=XmlNsForm.UNQUALIFIED * ... * ) * ! * &lt;!-- XML Schema fragment --> * &lt;schema * xmlns="http://www.w3.org/2001/XMLSchema" * xmlns:po="http://www.example.com/PO1" ! * elementFormDefault="unqualified"> * * </pre> * @author Sekhar Vajjhala, Sun Microsystems, Inc. * @since 1.6, JAXB 2.0 --- 87,116 ---- * @javax.xml.bind.annotation.XmlNs(prefix="xs", * namespaceURI="http://www.w3.org/2001/XMLSchema") * ) * ) * ! * &lt;!-- XML Schema fragment --&gt; * &lt;schema * xmlns:xs="http://www.w3.org/2001/XMLSchema" * xmlns:po="http://www.example.com/PO1" ! * targetNamespace="http://www.example.com/PO1"&gt; * * </pre> * * <p><b>Example 3:</b> Customize elementFormDefault</p> * <pre> * @javax.xml.bind.annotation.XmlSchema ( * elementFormDefault=XmlNsForm.UNQUALIFIED * ... * ) * ! * &lt;!-- XML Schema fragment --&gt; * &lt;schema * xmlns="http://www.w3.org/2001/XMLSchema" * xmlns:po="http://www.example.com/PO1" ! * elementFormDefault="unqualified"&gt; * * </pre> * @author Sekhar Vajjhala, Sun Microsystems, Inc. * @since 1.6, JAXB 2.0
*** 178,192 **** * <h3>Note to implementor</h3> * <p> * More precisely, the value must be either <tt>""</tt>, <tt>"##generate"</tt>, or * <a href="http://www.w3.org/TR/xmlschema-2/#anyURI"> * a valid lexical representation of <tt>xs:anyURI</tt></a> that begins ! * with <tt>&lt;scheme>:</tt>. * * <p> * A schema generator is expected to generate a corresponding ! * <tt>&lt;xs:import namespace="..." schemaLocation="..."/></tt> (or * no <tt>schemaLocation</tt> attribute at all if the empty string is specified.) * However, the schema generator is allowed to use a different value in * the <tt>schemaLocation</tt> attribute (including not generating * such attribute), for example so that the user can specify a local * copy of the resource through the command line interface. --- 177,191 ---- * <h3>Note to implementor</h3> * <p> * More precisely, the value must be either <tt>""</tt>, <tt>"##generate"</tt>, or * <a href="http://www.w3.org/TR/xmlschema-2/#anyURI"> * a valid lexical representation of <tt>xs:anyURI</tt></a> that begins ! * with <tt>&lt;scheme&gt;:</tt>. * * <p> * A schema generator is expected to generate a corresponding ! * <tt>&lt;xs:import namespace="..." schemaLocation="..."/&gt;</tt> (or * no <tt>schemaLocation</tt> attribute at all if the empty string is specified.) * However, the schema generator is allowed to use a different value in * the <tt>schemaLocation</tt> attribute (including not generating * such attribute), for example so that the user can specify a local * copy of the resource through the command line interface.
< prev index next >