You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

145 lines
4.4 KiB

  1. <?xml version="1.0" standalone="no"?>
  2. <!--
  3. * Licensed to the Apache Software Foundation (ASF) under one or more
  4. * contributor license agreements. See the NOTICE file distributed with
  5. * this work for additional information regarding copyright ownership.
  6. * The ASF licenses this file to You under the Apache License, Version 2.0
  7. * (the "License"); you may not use this file except in compliance with
  8. * the License. You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. -->
  18. <!DOCTYPE s1 SYSTEM "sbk:/style/dtd/document.dtd">
  19. <s1 title="Sample: SEnumVal">
  20. <s2 title="SEnumVal">
  21. <p>SEnumVal shows how to enumerate the markup declarations in a Schema Grammar.</p>
  22. <s3 title="Running SEnumVal">
  23. <p>This program parses the specified XML file, then shows how to
  24. enumerate the contents of the Schema Grammar. </p>
  25. <source>
  26. Usage:
  27. SEnumVal &lt;XML file&gt;
  28. This program parses a file, then shows how to enumerate the
  29. contents of the Schema Grammar. Essentially, shows how one can
  30. access the Schema information stored in internal data structures.
  31. </source>
  32. <p>Here is a sample output from SEnumVal</p>
  33. <source>cd &XercesC3InstallDir;/samples/data
  34. SEnumVal personal-schema.xml
  35. Name: personnel
  36. Model Type: Children
  37. Create Reason: Declared
  38. ContentType: OneOrMore
  39. Content Model: (person)+
  40. ComplexType:
  41. TypeName: ,C0
  42. ContentType: OneOrMore
  43. --------------------------------------------
  44. Name: person
  45. Model Type: Children
  46. Create Reason: Declared
  47. ContentType: Sequence
  48. Content Model: (name,email*,url*,link?)
  49. ComplexType:
  50. TypeName: ,C1
  51. ContentType: Sequence
  52. Attributes:
  53. Name: salary
  54. Type: CDATA
  55. Default Type: #IMPLIED
  56. Base Datatype: Decimal
  57. Facets:
  58. fractionDigits=0
  59. Name: id
  60. Type: ID
  61. Default Type: #REQUIRED
  62. Base Datatype: ID
  63. Name: contr
  64. Type: CDATA
  65. Default Type: #DEFAULT
  66. Value: false
  67. Base Datatype: string
  68. Enumeration:
  69. true
  70. false
  71. Name: note
  72. Type: CDATA
  73. Default Type: #IMPLIED
  74. Base Datatype: string
  75. --------------------------------------------
  76. Name: name
  77. Model Type: Children
  78. Create Reason: Declared
  79. ContentType: All
  80. Content Model: All(family,given)
  81. ComplexType:
  82. TypeName: ,C3
  83. ContentType: All
  84. --------------------------------------------
  85. Name: family
  86. Model Type: Simple
  87. Create Reason: Declared
  88. Base Datatype: string
  89. --------------------------------------------
  90. Name: given
  91. Model Type: Simple
  92. Create Reason: Declared
  93. Base Datatype: string
  94. --------------------------------------------
  95. Name: email
  96. Model Type: Simple
  97. Create Reason: Declared
  98. Base Datatype: string
  99. --------------------------------------------
  100. Name: url
  101. Model Type: Empty
  102. Create Reason: Declared
  103. Content Model: EMPTY
  104. ComplexType:
  105. TypeName: ,C4
  106. Attributes:
  107. Name: href
  108. Type: CDATA
  109. Default Type: #DEFAULT
  110. Value: http://
  111. Base Datatype: string
  112. --------------------------------------------
  113. Name: link
  114. Model Type: Empty
  115. Create Reason: Declared
  116. Content Model: EMPTY
  117. ComplexType:
  118. TypeName: ,C5
  119. Attributes:
  120. Name: subordinates
  121. Type: IDREFS
  122. Default Type: #IMPLIED
  123. Base Datatype: List
  124. Name: manager
  125. Type: IDREF
  126. Default Type: #IMPLIED
  127. Base Datatype: IDREF
  128. --------------------------------------------
  129. </source>
  130. </s3>
  131. </s2>
  132. </s1>