zoukankan      html  css  js  c++  java
  • JAXB

    This annotation can only be used with a package. It defines parameters that are derived from the xsd:schema element. It must be written on a file package-info.java situated in the package. Below is an example, specifying the namespace and elementFormDefault elements.

    @javax.xml.bind.annotation.XmlSchema(
        namespace = "http://www.laune.at/hospital", 
        elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
    package hospital;

    This annotation is equivalent to an xs:schema element

    <xs:schema elementFormDefault="qualified"
               targetNamespace="http://www.laune.at/hospital"
               xmlns:tns="http://www.laune.at/hospital"
               xmlns:xs="http://www.w3.org/2001/XMLSchema"
               version="1.0" >

    For defining namespace prefixes you use the xmlns element of the XmlSchema annotation. It contains an array of XmlNs annotations, each of which contains a prefix and anamespaceURI element. The previous example is extended with a namespace definition for the prefix med:

    @javax.xml.bind.annotation.XmlSchema(
        namespace = "http://www.laune.at/hospital", 
            xmlns = { @javax.xml.bind.annotation.XmlNs( prefix = "med",
                      namespaceURI = "http://www.laune.at/med" ) },
        elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
    package hospital;

    This corresponds to using xmlns:med="http://www.laune.at/med" as an attribute in the xs:schema element.

  • 相关阅读:
    feq ifneq ifdef ifndef
    clock gating | ODC-based Clock Gating
    clock gating | clock gating的timing check
    更换ICC2图形界面主题
    git 学习心得
    CSS颜色混合模式
    常用meta整理
    75份开发者、设计师必备的速查表
    jquery 编程的最佳实践
    JQuery总结一:选择器归纳
  • 原文地址:https://www.cnblogs.com/huey/p/5511725.html
Copyright © 2011-2022 走看看