|
Glassfish example source code file (change.xsd)
The Glassfish change.xsd source code<?xml version="1.0" encoding="utf-8"?> <!-- DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. Copyright (c) 1997-2010 Oracle and/or its affiliates. All rights reserved. The contents of this file are subject to the terms of either the GNU General Public License Version 2 only ("GPL") or the Common Development and Distribution License("CDDL") (collectively, the "License"). You may not use this file except in compliance with the License. You can obtain a copy of the License at https://glassfish.dev.java.net/public/CDDL+GPL_1_1.html or packager/legal/LICENSE.txt. See the License for the specific language governing permissions and limitations under the License. When distributing the software, include this License Header Notice in each file and include the License file at packager/legal/LICENSE.txt. GPL Classpath Exception: Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the GPL Version 2 section of the License file that accompanied this code. Modifications: If applicable, add the following below the License Header, with the fields enclosed by brackets [] replaced by your own identifying information: "Portions Copyright [year] [name of copyright owner]" Contributor(s): If you wish your version of this file to be governed by only the CDDL or only the GPL Version 2, indicate your decision by adding "[Contributor] elects to include this software in this distribution under the [CDDL or GPL Version 2] license." If you don't indicate a single choice of license, a recipient has the option to distribute your version of this file under either the CDDL, the GPL Version 2 or to extend the choice of license to its licensees as provided above. However, if you add GPL Version 2 code and therefore, elected the GPL Version 2 license, then the option applies only if the new code is made subject to such option by the copyright holder. --> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://java.sun.com/j2ee/s1as8se/XMLAlterUtil" xmlns="http://java.sun.com/j2ee/s1as8se/XMLAlterUtil" elementFormDefault="qualified"> <!-- <?xml version="1.0"?> <alterations xmlns="http://java.sun.com/j2ee/s1as8se/node_agent" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="change.xsd"> <alteration type="FIRST_OCCURRENCE" elementName="mbean" dnType="attribute" dnName="name" dnValue="node-controllers"> <addAttribute name="classname" value="com.sun.enterprise.ee.nodeagent.mbeans.NodeAgentConfigMBean"/> <addAttribute name="value" value="someValue"/> <changeAttribute name="group" value="configxxxx"/> <prefixAttribute name="group" value="configxxxx"/> <suffixAttribute name="group" value="configxxxx"/> </alteration> <alteration type="ALL" elementName="mbean"> <addAttribute name="target" value="TESTTEST"/> </alteration> <alteration type="ALL" elementName="mbean" dnType="attribute" dnName="name" dnValue="applications"> <removeElement/> </alteration> <alteration type="FIRST_OCCURRENCE" elementName="mbeans-descriptors"> <addElement> <mbean name="Synchronization" group="config" className="com.sun.enterprise.ee.synchronization.Synchronization"> <descriptor> <field name="ObjectName" value="{0}:type=synchronization,category=config"/> </descriptor> </mbean> </addElement> </alteration> </alterations> --> <xs:element name="alterations"> <xs:complexType> <xs:sequence> <xs:element name="alteration" minOccurs="0" maxOccurs="unbounded"> <xs:complexType> <xs:all> <!-- ** The elements below dictate the change actions to perform **--> <!-- addElement will add the children of the addElement to the element that a match is found in, including the root node. --> <xs:element name="addElement" minOccurs="0" maxOccurs="unbounded"> <xs:complexType mixed="true"> <xs:sequence> <xs:any minOccurs="0" maxOccurs="unbounded" processContents="skip"/> </xs:sequence> <!-- location is where to add the child elements "first", "before", "after" the default puts in at the end --> <xs:attribute name="location" type="xs:string" use="optional" /> <!-- Only supports matching on a the dnType "element" --> <xs:attribute name="dnType" type="xs:string" use="optional" /> <!-- dnName is the name of the element to match on --> <xs:attribute name="dnName" type="xs:string" use="optional" /> <!-- a fully qualified file can alternativley be used to hold the child elements to add --> <xs:attribute name="file" type="xs:string" use="optional" /> </xs:complexType> </xs:element> <!-- removeElement will remove the element that a match is found in --> <xs:element name="removeElement" minOccurs="0" maxOccurs="1"> <xs:complexType content="empty" /> </xs:element> <!-- addAttribute will add an attribute using the required name - value pairs specified in the attributes of the element --> <xs:element name="addAttribute" type="attributeType" minOccurs="0" maxOccurs="unbounded" /> <!-- changeAttribute will change the "name" attribute value to the value specified in the attributes of the element--> <xs:element name="changeAttribute" type="attributeType" minOccurs="0" maxOccurs="unbounded" /> <!-- prefixAttribute will prefix the "name" attribute value, with the value specified in the attributes of the element. If the attribute doesn't exist, it will be added --> <xs:element name="prefixAttribute" type="attributeType" minOccurs="0" maxOccurs="unbounded" /> <!-- suffixAttribute will suffix the "name" attribute value, with the value specified in the attributes of the element. If the attribute doesn't exist, it will be added --> <xs:element name="suffixAttribute" type="attributeType" minOccurs="0" maxOccurs="unbounded" /> </xs:all> <!-- ** attributes of alteration that are used to find a match **--> <xs:attribute name="type" use="required" default="ALL"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="FIRST_OCCURRENCE"/> <xs:enumeration value="ALL"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="elementName" type="xs:string" use="required" /> <xs:attribute name="dnType" use="optional" default="attribute"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="text"/> <xs:enumeration value="attribute"/> </xs:restriction> </xs:simpleType> </xs:attribute> <xs:attribute name="dnName" type="xs:string" use="optional" /> <xs:attribute name="dnValue" type="xs:string" use="optional" /> <xs:attribute name="dnModifier" use="optional" default="equal"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="startsWith"/> <xs:enumeration value="endsWith"/> <xs:enumeration value="contains"/> <xs:enumeration value="equals"/> </xs:restriction> </xs:simpleType> </xs:attribute> </xs:complexType> </xs:element> </xs:sequence> </xs:complexType> </xs:element> <!-- complexType used for both the addAttribute and changeAttribute elements --> <xs:complexType name="attributeType"> <xs:attribute name="name" type="xs:string" use="required" /> <xs:attribute name="value" type="xs:string" use="required" /> </xs:complexType> </xs:schema> Other Glassfish examples (source code examples)Here is a short list of links related to this Glassfish change.xsd source code file: |
... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2021 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.