home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-tomcat-addon-1.4.9-installer.exe / servlet-api.jar / javax / servlet / resources / jspxml.xsd < prev    next >
Encoding:
Extensible Markup Language  |  2004-08-28  |  17.2 KB  |  514 lines

  1. <?xml version ="1.0"?>
  2. <!--
  3.   Copyright 2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <!DOCTYPE schema [
  18. <!-- Patterns -->
  19. <!ENTITY Identifier   "(\p{L}|_|$)(\p{N}|\p{L}|_|$)*">
  20. <!ENTITY TypeName     "&Identifier;(\.&Identifier;)*">
  21. <!ENTITY WS       "\s*">
  22. <!ENTITY Import     "&TypeName;(\.\*)?">
  23. <!ENTITY ImportList   "&Import;(&WS;,&WS;&Import;)*">
  24. <!ENTITY SetProp    "(&Identifier;|\*)">
  25. <!ENTITY RelativeURL  "[^:#/\?]*(:{0,0}|[#/\?].*)">
  26. <!ENTITY Length     "[0-9]*%?">
  27. <!ENTITY AsciiName    "[A-Za-z0-9_-]*">
  28. <!ENTITY ValidContentType  "&AsciiName;/&AsciiName;(;&WS;(charset=)?&AsciiName;)?">
  29. <!ENTITY ValidPageEncoding  "&AsciiName;/&AsciiName;">
  30. <!ENTITY Buffer     "[0-9]+kb">
  31. <!ENTITY RTexpr     "%=.*%">
  32. ]>
  33.  
  34.  
  35. <!--Conforms to w3c http://www.w3.org/2001/XMLSchema -->
  36.  
  37. <xsd:schema
  38.     xmlns = "http://java.sun.com/JSP/Page"
  39.     xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
  40.     xmlns:jsp = "http://java.sun.com/JSP/Page"
  41.     targetNamespace = "http://java.sun.com/JSP/Page"
  42.     elementFormDefault = "qualified"
  43.     attributeFormDefault = "unqualified">
  44.  
  45.   <xsd:annotation>
  46.     <xsd:documentation>
  47.       XML Schema for JSP 2.0.
  48.  
  49.       This schema is based upon the recent (May 5th, 2001)
  50.       W3C recommendation for XML Schema.
  51.  
  52.       A JSP translator should reject an XML-format file that is
  53.       not strictly valid according to this schema or does not observe
  54.       the constraints documented here. A translator is not required
  55.       to use this schema for validation or to use a validating parser.
  56.     </xsd:documentation>
  57.   </xsd:annotation>
  58.  
  59.  
  60.   <!-- Complex Types -->
  61.  
  62.   <xsd:complexType name = "Body">
  63.     <xsd:annotation>
  64.       <xsd:documentation>
  65.         Body defines the "top-level" elements in root and beanInfo.
  66.         There are probably other elements that should use it.
  67.       </xsd:documentation>
  68.     </xsd:annotation>
  69.     <xsd:group ref = "Bodygroup" minOccurs = "0" maxOccurs = "unbounded"/>
  70.   </xsd:complexType>
  71.  
  72.   <!-- groups -->
  73.  
  74.   <xsd:group name = "Bodygroup">
  75.     <xsd:choice>
  76.       <xsd:element ref = "directive.page"/>
  77.       <xsd:element ref = "directive.include"/>
  78.       <xsd:element ref = "scriptlet"/>
  79.       <xsd:element ref = "declaration"/>
  80.       <xsd:element ref = "expression"/>
  81.       <xsd:element ref = "useBean"/>
  82.       <xsd:element ref = "setProperty"/>
  83.       <xsd:element ref = "getProperty"/>
  84.       <xsd:element ref = "include"/>
  85.       <xsd:element ref = "forward"/>
  86.       <xsd:element ref = "plugin"/>
  87.       <xsd:element ref = "text"/>
  88.       <xsd:any namespace="##other" processContents = "lax"/>
  89.     </xsd:choice>
  90.   </xsd:group>
  91.  
  92.  
  93.   <!-- Simple types are next -->
  94.  
  95.   <xsd:simpleType name = "RTE">
  96.     <xsd:annotation>
  97.       <xsd:documentation>
  98.         A request-time expression value
  99.       </xsd:documentation>
  100.     </xsd:annotation>
  101.     <xsd:restriction base = "xsd:string">
  102.       <xsd:pattern value = "&RTexpr;"/>
  103.     </xsd:restriction>
  104.   </xsd:simpleType>
  105.  
  106.   <xsd:simpleType name = "Bool">
  107.     <xsd:annotation>
  108.       <xsd:documentation>
  109.         Bool would be boolean except it does not accept 1 and 0.
  110.       </xsd:documentation>
  111.     </xsd:annotation>
  112.     <xsd:restriction base = "xsd:NMTOKEN" >
  113.       <xsd:enumeration value = "true"/>
  114.       <xsd:enumeration value = "false"/>
  115.       <xsd:enumeration value = "yes"/>
  116.       <xsd:enumeration value = "no"/>
  117.     </xsd:restriction>     
  118.   </xsd:simpleType>
  119.  
  120.   <xsd:simpleType name = "Identifier">
  121.     <xsd:annotation>
  122.       <xsd:documentation>
  123.         Identifier is an unqualified Java identifier.
  124.       </xsd:documentation>
  125.     </xsd:annotation>
  126.     <xsd:restriction base = "xsd:string">
  127.       <xsd:pattern value = "&Identifier;"/>
  128.     </xsd:restriction>
  129.   </xsd:simpleType>
  130.   
  131.   <xsd:simpleType name = "TypeName">
  132.     <xsd:annotation>
  133.       <xsd:documentation>
  134.         TypeName is one or more Java identifiers separated by dots
  135.         with no whitespace.
  136.       </xsd:documentation>
  137.     </xsd:annotation>
  138.     <xsd:restriction base = "xsd:string">
  139.       <xsd:pattern value = "&TypeName;"/>
  140.     </xsd:restriction>
  141.   </xsd:simpleType>
  142.   
  143.   <xsd:simpleType name = "ImportList">
  144.     <xsd:annotation>
  145.       <xsd:documentation>
  146.         ImportList is one or more typeNames separated by commas.
  147.         Whitespace is allowed before and after the comma.
  148.       </xsd:documentation>
  149.     </xsd:annotation>
  150.     <xsd:restriction base = "xsd:string">
  151.       <xsd:pattern value = "&ImportList;"/>
  152.     </xsd:restriction>
  153.   </xsd:simpleType>
  154.   
  155.   <xsd:simpleType name = "SetProp">
  156.     <xsd:annotation>
  157.       <xsd:documentation>
  158.         SetProp is an Identifier or *.
  159.       </xsd:documentation>
  160.     </xsd:annotation>
  161.     <xsd:restriction base = "xsd:string">
  162.       <xsd:pattern value = "&SetProp;"/>
  163.     </xsd:restriction>
  164.   </xsd:simpleType>
  165.   
  166.   <xsd:simpleType name = "RelativeURL">
  167.     <xsd:annotation>
  168.       <xsd:documentation>
  169.         RelativeURL is a uriReference with no colon character
  170.         before the first /, ? or #, if any (RFC2396).
  171.       </xsd:documentation>
  172.     </xsd:annotation>
  173.     <xsd:restriction base = "xsd:anyURI">
  174.       <xsd:pattern value = "&RelativeURL;"/>
  175.     </xsd:restriction>
  176.   </xsd:simpleType>
  177.  
  178.   <xsd:simpleType name = "RTERelativeURL">
  179.     <xsd:union memberTypes = "RelativeURL RTE"/>
  180.   </xsd:simpleType>
  181.  
  182.   <xsd:simpleType name = "Length">
  183.     <xsd:annotation>
  184.       <xsd:documentation>
  185.         Length is nn or nn%.
  186.       </xsd:documentation>
  187.     </xsd:annotation>
  188.     <xsd:restriction base = "xsd:string">
  189.       <xsd:pattern value = "&Length;"/>
  190.     </xsd:restriction>
  191.   </xsd:simpleType>
  192.   
  193.  
  194.   <xsd:simpleType name = "ExplicitBufferSize">
  195.     <xsd:annotation>
  196.       <xsd:documentation>
  197.          Buffer Size with an explicit value
  198.       </xsd:documentation>
  199.     </xsd:annotation> 
  200.     <xsd:restriction base = "xsd:string">
  201.       <xsd:pattern value = "&Buffer;"/>
  202.     </xsd:restriction>
  203.   </xsd:simpleType>
  204.  
  205.   <xsd:simpleType name = "NoneBufferSize">
  206.     <xsd:annotation>
  207.       <xsd:documentation>
  208.          Buffer Size with a "none" value
  209.       </xsd:documentation>
  210.     </xsd:annotation> 
  211.        <xsd:restriction base = "xsd:string">
  212.          <xsd:enumeration value = "none"/>
  213.        </xsd:restriction>
  214.   </xsd:simpleType>
  215.  
  216.   <xsd:simpleType name = "BufferSize">
  217.     <xsd:annotation>
  218.       <xsd:documentation>
  219.         Buffer size is xkb or none.
  220.       </xsd:documentation>
  221.     </xsd:annotation>
  222.     <xsd:union memberTypes = "ExplicitBufferSize NoneBufferSize"/>
  223.   </xsd:simpleType>
  224.   
  225.   <xsd:simpleType name = "ContentType">
  226.     <xsd:annotation>
  227.       <xsd:documentation>
  228.         Content type and character encoding for this page.
  229.       </xsd:documentation>
  230.     </xsd:annotation>
  231.     <xsd:restriction base = "xsd:string">
  232.       <xsd:pattern value = "&ValidContentType;"/>
  233.     </xsd:restriction>
  234.   </xsd:simpleType>
  235.  
  236.   <xsd:simpleType name = "PageEncoding">
  237.     <xsd:annotation>
  238.       <xsd:documentation>
  239.         Page Encoding for this page.
  240.       </xsd:documentation>
  241.     </xsd:annotation>
  242.     <xsd:restriction base = "xsd:string">
  243.       <xsd:pattern value = "&ValidPageEncoding;"/>
  244.     </xsd:restriction>
  245.   </xsd:simpleType>
  246.  
  247.   <xsd:simpleType name = "Scope">
  248.     <xsd:annotation>
  249.       <xsd:documentation>
  250.         valid scope values
  251.       </xsd:documentation>
  252.     </xsd:annotation>
  253.     <xsd:restriction base = "xsd:NMTOKEN">
  254.       <xsd:enumeration value = "page"/>
  255.       <xsd:enumeration value = "session"/>
  256.       <xsd:enumeration value = "request"/>
  257.       <xsd:enumeration value = "application"/>
  258.     </xsd:restriction>
  259.   </xsd:simpleType>
  260.  
  261.   <xsd:simpleType name = "PlugInType">
  262.     <xsd:annotation>
  263.       <xsd:documentation>
  264.         valid values for a plugin type
  265.       </xsd:documentation>
  266.     </xsd:annotation>
  267.     <xsd:restriction base = "xsd:NMTOKEN">
  268.       <xsd:enumeration value = "bean"/>
  269.       <xsd:enumeration value = "applet"/>
  270.     </xsd:restriction>
  271.   </xsd:simpleType>
  272.  
  273.   <xsd:simpleType name = "AlignType">
  274.     <xsd:annotation>
  275.       <xsd:documentation>
  276.         Buffer size is xkb.
  277.       </xsd:documentation>
  278.     </xsd:annotation>
  279.     <xsd:restriction base = "xsd:NMTOKEN">
  280.       <xsd:enumeration value = "top"/>
  281.       <xsd:enumeration value = "middle"/>
  282.       <xsd:enumeration value = "bottom"/>
  283.       <xsd:enumeration value = "left"/>
  284.       <xsd:enumeration value = "right"/>
  285.     </xsd:restriction>
  286.   </xsd:simpleType>
  287.  
  288.   <!-- Elements follow -->
  289.  
  290.   <xsd:element name = "root">
  291.     <xsd:annotation>
  292.       <xsd:documentation>
  293.         The root element of all JSP documents is named root.
  294.         
  295.         Authors may, if they wish, include schema location information.
  296.         If specified, the information may appear as attributes of
  297.         the root element as follows:
  298.  
  299.         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  300.         xsi:schemaLocation="http://java.sun.com/JSP/Page xsd-file-location"
  301.  
  302.         Documents should not specify the system identifier of a DTD
  303.         in a DOCTYPE declaration.
  304.       </xsd:documentation>
  305.     </xsd:annotation>
  306.     <xsd:complexType>
  307.       <xsd:complexContent>
  308.         <xsd:extension base = "Body">
  309.           <xsd:attribute name = "version" fixed = "2.0" type = "xsd:string"/>
  310.         </xsd:extension>
  311.       </xsd:complexContent>
  312.     </xsd:complexType>
  313.   </xsd:element>
  314.   
  315.   <xsd:element name = "directive.page">
  316.     <xsd:annotation>
  317.       <xsd:documentation>
  318.         directive.page is the "page directive".
  319.       </xsd:documentation>
  320.     </xsd:annotation>
  321.     <xsd:complexType>
  322.       <xsd:attribute name = "language" default = "java" type = "xsd:string"/>
  323.       <xsd:attribute name = "extends" type = "TypeName"/>
  324.       <xsd:attribute name = "contentType" default = "text/html; ISO-8859-1" type = "ContentType"/>
  325.       <xsd:attribute name = "pageEncoding" use = "optional" type = "PageEncoding"/>
  326.       <xsd:attribute name = "import" type = "ImportList"/>
  327.       <xsd:attribute name = "session" default = "true" type = "Bool"/>
  328.       <xsd:attribute name = "buffer" default = "8kb" type = "BufferSize"/>
  329.       <xsd:attribute name = "autoFlush" default = "true" type = "Bool"/>
  330.       <xsd:attribute name = "isThreadSafe" default = "true" type = "Bool"/>
  331.       <xsd:attribute name = "info" type = "xsd:string"/>
  332.       <xsd:attribute name = "errorPage" type = "RelativeURL"/>
  333.       <xsd:attribute name = "isErrorPage" default = "false" type = "Bool"/>
  334.       <xsd:attribute name = "isELIgnored" type = "Bool"/>
  335.     </xsd:complexType>
  336.   </xsd:element>
  337.   
  338.   <xsd:element name = "directive.include">
  339.     <xsd:annotation>
  340.       <xsd:documentation>
  341.         directive.include is the "include directive".
  342.     This element does not appear on XML views of JSP pages.
  343.       </xsd:documentation>
  344.     </xsd:annotation>
  345.     <xsd:complexType>
  346.       <xsd:attribute name = "file" use = "required" type = "RelativeURL"/>
  347.     </xsd:complexType>
  348.   </xsd:element>
  349.  
  350.   <xsd:element name = "scriptlet" type = "xsd:string">
  351.     <xsd:annotation>
  352.       <xsd:documentation>
  353.         The representation of a scriplet.
  354.       </xsd:documentation>
  355.     </xsd:annotation>
  356.   </xsd:element>
  357.   
  358.   <xsd:element name = "declaration" type = "xsd:string">
  359.     <xsd:annotation>
  360.       <xsd:documentation>
  361.         The reprsentation of a declaration.
  362.       </xsd:documentation>
  363.     </xsd:annotation>
  364.   </xsd:element>
  365.   
  366.   <xsd:element name = "expression" type = "xsd:string">
  367.     <xsd:annotation>
  368.       <xsd:documentation>
  369.         The representation of an expression.
  370.       </xsd:documentation>
  371.     </xsd:annotation>
  372.   </xsd:element>
  373.  
  374.   <xsd:element name = "text" type = "xsd:string">
  375.     <xsd:annotation>
  376.       <xsd:documentation>
  377.         Verbatim template text.
  378.       </xsd:documentation>
  379.     </xsd:annotation>
  380.   </xsd:element>
  381.  
  382.   <xsd:element name = "useBean">
  383.     <xsd:annotation>
  384.       <xsd:documentation>
  385.         useBean instantiates or accesses a bean in the specified scope.
  386.         
  387.         Constraint: The allowed combinations of attributes are:
  388.         
  389.           class [type] | type [( class | beanName)]
  390.         
  391.       </xsd:documentation>
  392.     </xsd:annotation>
  393.     <xsd:complexType>
  394.       <xsd:complexContent>
  395.         <xsd:extension base="Body">
  396.           <xsd:attribute name = "id" use = "required" type = "Identifier"/>
  397.           <xsd:attribute name = "class" type = "TypeName"/>
  398.           <xsd:attribute name = "type" type = "TypeName"/>
  399.           <xsd:attribute name = "beanName" type = "TypeName"/>
  400.           <xsd:attribute name = "scope" default = "page" type = "Scope"/>
  401.         </xsd:extension>
  402.       </xsd:complexContent>
  403.     </xsd:complexType>
  404.   </xsd:element>
  405.   
  406.   <xsd:element name = "setProperty">
  407.     <xsd:annotation>
  408.       <xsd:documentation>
  409.         setProperty changes the value of an object property.
  410.         
  411.         Constraint: The object named by the name must have been
  412.         "introduced" to the JSP processor using either the
  413.         jsp:useBean action or a custom action with an associated
  414.         VariableInfo entry for this name.
  415.  
  416.         Exact valid combinations are not expressable in XML Schema.
  417.         They are:
  418.  
  419.         name="Identifier" property="*"
  420.         name="Identifier" property="Identfiier" param="string"
  421.         name="Identifier" property="Identifier" value="string"
  422.                 
  423.       </xsd:documentation>
  424.     </xsd:annotation>
  425.     <xsd:complexType>
  426.       <xsd:attribute name = "name" use = "required" type = "Identifier"/>
  427.       <xsd:attribute name = "property" use = "required" type = "SetProp"/>
  428.       <xsd:attribute name = "param" type = "xsd:string"/>
  429.       <xsd:attribute name = "value" type = "xsd:string"/>
  430.     </xsd:complexType>
  431.   </xsd:element>
  432.  
  433.   <xsd:element name = "getProperty">
  434.     <xsd:annotation>
  435.       <xsd:documentation>
  436.         getProperty obtains the value of an object property.
  437.         
  438.         Constraint: The object named by the name must have been
  439.         "introduced" to the JSP processor using either the
  440.         jsp:useBean action or a custom action with an associated
  441.         VariableInfo entry for this name.
  442.         
  443.         ???The spec is interpreted as restricting the values of
  444.         property to Identifier.
  445.       </xsd:documentation>
  446.     </xsd:annotation>
  447.     <xsd:complexType>
  448.       <xsd:attribute name = "name" use = "required" type = "Identifier"/>
  449.       <xsd:attribute name = "property" use = "required" type = "Identifier"/>
  450.     </xsd:complexType>
  451.   </xsd:element>
  452.   
  453.   <xsd:element name = "include">
  454.     <xsd:complexType>
  455.       <xsd:sequence>
  456.         <xsd:element ref = "param" minOccurs = "0" maxOccurs = "unbounded"/>
  457.       </xsd:sequence>
  458.       <xsd:attribute name = "flush" default = "false" type = "Bool"/>
  459.       <xsd:attribute name = "page" use = "required" type = "RTERelativeURL"/>
  460.     </xsd:complexType>
  461.   </xsd:element>
  462.  
  463.   <xsd:element name = "forward">
  464.     <xsd:complexType>
  465.       <xsd:sequence>
  466.         <xsd:element ref = "param" minOccurs = "0" maxOccurs = "unbounded"/>
  467.       </xsd:sequence>
  468.       <xsd:attribute name = "page" use = "required" type = "RTERelativeURL"/>
  469.      </xsd:complexType>
  470.   </xsd:element>
  471.   
  472.   <xsd:element name = "plugin">
  473.     <xsd:complexType> <!-- content only! -->
  474.       <xsd:sequence>
  475.         <xsd:element ref = "params" minOccurs = "0" maxOccurs = "1"/>
  476.         <xsd:element name = "fallback" minOccurs = "0" maxOccurs = "1" type = "Body"/>
  477.       </xsd:sequence>
  478.       <xsd:attribute name = "type" use = "required" type = "PlugInType"/>
  479.       <xsd:attribute name = "code" type = "xsd:anyURI"/>
  480.       <xsd:attribute name = "codebase" type = "xsd:anyURI"/>
  481.       <xsd:attribute name = "align" type = "AlignType"/>
  482.       <xsd:attribute name = "archive">
  483.         <xsd:simpleType>
  484.            <xsd:list itemType="xsd:anyURI"/>
  485.         </xsd:simpleType>
  486.       </xsd:attribute>
  487.       <xsd:attribute name = "height" type = "Length"/>
  488.       <xsd:attribute name = "hspace" type = "xsd:int"/>
  489.       <xsd:attribute name = "jreversion" default = "1.2" type = "xsd:string"/>
  490.       <xsd:attribute name = "name" type = "xsd:NMTOKEN"/>
  491.       <xsd:attribute name = "vspace" type = "xsd:int"/>
  492.       <xsd:attribute name = "width" type = "Length"/>
  493.       <xsd:attribute name = "nspluginurl" type = "xsd:anyURI"/>
  494.       <xsd:attribute name = "iepluginurl" type = "xsd:anyURI"/>
  495.     </xsd:complexType>
  496.   </xsd:element>
  497.   
  498.   <xsd:element name = "params">
  499.     <xsd:complexType>
  500.        <xsd:sequence>
  501.          <xsd:element ref = "param" minOccurs = "1" maxOccurs = "unbounded"/>
  502.        </xsd:sequence>
  503.     </xsd:complexType>
  504.   </xsd:element>
  505.  
  506.   <xsd:element name = "param">
  507.     <xsd:complexType>
  508.       <xsd:attribute name = "name" use = "required" type = "xsd:NMTOKEN"/>
  509.       <xsd:attribute name = "value" use = "required" type = "xsd:string"/>
  510.     </xsd:complexType>
  511.   </xsd:element>
  512.   
  513. </xsd:schema>
  514.