際際滷

際際滷Share a Scribd company logo
XML  亠仄舒  (XML Schema) [email_address] 个亟仂 舒仍从亳仆
个舒亰 亳仗仂仍亰仂于舒仆亳 仂仆亳亞舒亳 (于 仗仂从舒 仆仂仄舒仍仆仂) 仄舒仍仂亠 亳仗仂仍亰仂于舒仆亳亠 从仂亟 仗亳舒仍 仂亟仆亳仄 亠仍仂于亠从仂仄 弍仂仍仂亶 于仂仗仂 仗仂 仆亠仂弍仂亟亳仄仂亳, 于仂仂弍亠 亠弍-亠于亳 (仄亠仍从亳亠 舒仆仆仂亳) 从亳亠 亟亠舒仍亠亶 弍亳弍仍亳仂亠从舒仄亳  JAXB   & JAX-WS 仍亠从亳 (仆舒亳仆舒ム 仗仂弍仍亠仄) 丼亂 仄仆仂亞仂  XML  亟舒仆仆 于亳亠 仂弍亠亶 亟仂亞仂于仂仆仆仂亳 仂 仂仄舒舒  XML 亠亞亠亳仂仆仆亠 仂亳弍从亳 仗亳 亳亰仄亠仆亠仆亳亳 仂仄舒仂于 弌仍仂亢仆仂 仗仂亟亟亠亢舒仆亳 仄仂亟仍仆 亠仂于 于 舒从舒仍仆仂仄 仂仂礌亳亳 (仗仂亠从  eks-scripts & docFlow-engine )
丼亂 仄仆仂亞仂  XML  亟舒仆仆 <inbox action=&quot;new-inbox-item&quot; format=&quot;standart&quot;>  <from>fromId</from> <to>toId</to>  <route>REVIEW</route>  <item>docId-123</item> <cause>TO_REVIEW</cause>  <to-date>2008-05-15T15:46:49.081+04:00</to-date>  <tag>route-id:route-id</tag> <tag>action:review</tag>  <tag>reviewer:reviewerId</tag>  <tag>parent-route-id:incomingRouteId</tag> <tag>parent-klerk:INCOMING</tag>  <extended> <comment>comment</comment>  <file-attachment>file-id-01</file-attachment> </extended>  <operation type=&quot;reply&quot; id=&quot;reply-yes-no&quot; behaviour=&quot;close-on-reply&quot;> <yes-no>  <data-validator klerk=&quot;REVIEW&quot; question=&quot;ValidateData_review&quot;/> </yes-no>  </operation>  <operation type=&quot;action&quot; id=&quot;action-start-instruction&quot;> <start-workflow workflow='INSTRUCTION'> <parent-route-id>new assigned to review id</parent-route-id> <parent-klerk>REVIEW</parent-klerk> <parent-user>b470e114-a0be-46ee-bba5-aee66c52e349</parent-user> </start-workflow>  </operation> </inbox>
于亳亠 仂弍亠亶 亟仂亞仂于仂仆仆仂亳 仂 仂仄舒舒  XML <parent-route-id>parent_route_id</parent-route-id> <parent-klerk>ORDER</parent-klerk> <parent-user>parent_user_id</parent-user> 亳 <tag>route-stage:ASSIGNMENT</tag> <tag>parent-route-id:parentRouteId</tag> <tag>parent-klerk:CONTRACT</tag>
亠亞亠亳仂仆仆亠 仂亳弍从亳 仗亳 亳亰仄亠仆亠仆亳亳 仂仄舒仂于 XML
弌仍仂亢仆仂 仗仂亟亟亠亢舒仆亳 仄仂亟仍仆 亠仂于 于 舒从舒仍仆仂仄 仂仂礌亳亳
XML Schema (XML  亠仄舒 ) XML Schema   仆舒亰于舒仆亳亠 舒仆亟舒舒, 仂仄舒 亳 亳仆舒从亳  XML  亟仂从仄亠仆舒, 仂仗亳于舒ム亳亶  XML  从. 仂亢仆仂 从舒亰舒, 仂 仂 仗舒于亳仍舒 (亳仗舒 亠亞仍仆 于舒亢亠仆亳亶). 仂仂仄 仗仂 亳仄 仗舒于亳仍舒仄 仗仂于亠磳  仂仂于亠于亠 仍亳  XML  亟仂从仄亠仆 亳仄 仗舒于亳仍舒仄? XML  亟仂从仄亠仆 仄仂亢亠 舒仄 亰舒磦仍, 仂 仂仆 仂仂于亠于亠 仂仗亠亟亠仍仆仆仂亶 亠仄亠.
舒从亳亠 仗仂弍仍亠仄 亠亳 仂仄亠仆舒仍仆舒 仗仂于亠从舒 亠于ム亳  XML  仆舒 仂仂于亠于亳亠 仆仂于仄 仗舒于亳仍舒仄 (弍舒 从仂亠从亳仂于从舒 从仂亟仂于 仗仂 仗仂于舒仍亳于亳仄 亠舒仄) 亟亳仆仂仂弍舒亰亳亠  XML  亟舒仆仆  仄亠仆亠仆亳亠  从仂仍亳亠于舒 亳 仗仂亠仆亳亠 从仂亟舒 仗仂 舒弍仂亠   XML 弌仂亰亟舒仆亳亠 仂弍亠亞仂 仍仂于舒  舒仆舒仍亳亳从舒仄亳, 从仂仂亠 于 亢亠 仂 亰仆舒 从舒从亳亠 亟舒仆仆亠 仗亠亠亟舒ム 仄亠亢亟 从仍亠从舒仄亳.
XML  亟仂从仄亠仆 仂 亠仄仂亶 <rootElement   xmlns=&quot;http://ru.sefer/schema/1&quot;   xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;   xsi:schemaLocation=&quot;http://ru.sefer/schema/1 http://ru.sefer/schema/1.xsd&quot; > xmlns   仗仂舒仆于仂 亳仄仆 仗仂-仄仂仍舒仆亳 schemaLocation   仄亠仂仗仂仍仂亢亠仆亳亠 亠仄
于亠亟亠仆亳亠 弌亠仄舒 仂仗亠亟亠仍磳 仗亳仂从 仍亠仄亠仆仂于 亳 舒亳弍仂于, 从仂仂亠 仄仂亞 弍 亳仗仂仍亰仂于舒仆 于 亟仂从仄亠仆亠. 仆舒 舒从亢亠 仂仗亠亟亠仍磳 仗仂磲仂从, 于 从仂仂仂仄 仂仆亳 仗仂磦仍ム 于  XML  亳 亳 亳仗. 亊亰从 仂仗亳舒仆亳  XML Schema  XML Schema Definition (XSD)
亠亳仄亠于舒 XSD 仂弍亠仗亠亳于舒亠 弍仂仍亠 从仂仆仂仍   仆舒亟 从仂亶 亳 亳仗舒仄亳, 亠仄 DTD . XSD 仗仂亰于仂仍磳 仂亰亟舒于舒 仂弍于亠仆仆亠 亳仗 亟舒仆仆. XSD 仗仂亰于仂仍磳 仆舒从仍舒亟于舒 仂亞舒仆亳亠仆亳 仆舒 亟舒仆仆亠.  弌亳仆舒从亳 亠仄 舒从仂亶 亢亠 从舒从  舒仄仂亞仂 亟仂从仄亠仆舒 -  XML .  XML 亠仄舒 舒亳磳仄舒.
XML Spy
Oxygen
丐亳仗 亟舒仆仆 丐亳仗 亟舒仆仆 仂仗亠亟亠仍磳, 仂 仄仂亢亠 舒仆亳 于仆亳 仍亠仄亠仆舒 .  XSD  仗亠亟仂舒于仍磳 磲 仗亠亟仂仗亠亟亠仍仆仆 亳仗仂于, 从仂仂亠 仄仂亢仆仂 从仍舒亳亳亳仂于舒 舒从 : 亳仄亳亳于仆亠 :  弍舒亰仂于亠 亳仗 .  舒仍亠亟仂于舒仆仆亠 :  仂仗亠亟亠仍亠仆  亳仗仂仍亰仂于舒仆亳亠仄 亟亞亳 亳仗仂于 (仆舒亰于舒亠仄 束弍舒亰仂于仄亳損)   仂仄舒仆亠 :  仗亳仄亳亳于仆亠 亳仍亳 仆舒仍亠亟仂于舒仆仆亠, 从仂仂亠 仆亠 仄仂亞 弍 舒亰弍亳 仆舒 弍仂仍亠亠 仄亠仍从亳亠 从从亳   弌仗亳从亳 :  仆舒仍亠亟仂于舒仆仆亶 亳仗, 仂亟亠亢舒亳亶 亠亳 舒仂仄舒仆 弍亠亟亳仆仆仆亠 :  亠亰仍舒 仂弍亠亟亳仆亠仆亳 舒仂仄舒仆 亳仗仂于 亳 仗亳从仂于
亅仍亠仄亠仆 弌亠于亠 2 亳仗 仍亠仄亠仆仂于: 仗仂亠 亳 仍仂亢仆亠. 仂仂亶 仍亠仄亠仆 仂仂亶 仍亠仄亠仆 仆亠 仂亟亠亢亳   舒亳弍仂于 亳仍亳 亟仂亠仆亳 亰仍仂于 弌亳仆舒从亳 仂弍磦仍亠仆亳 仗仂仂亞仂 仍仄亠仆舒 : <xsd:element name=&quot;element-name&quot; type=&quot;data type&quot; minOccurs=&quot;nonNegativeInteger&quot; maxOccurs=&quot;nonNegativeInteger|unbounded&quot;/>
< PRODUCTDATA > < PRODUCT   PRODUCTID =&quot;P001&quot;  CATEGORY =&quot;BOOKS&quot;> < PRODUCTNAME >Gone With the Wind</ PRODUCTNAME > < DESCRIPTION > The backdrop of this book is the American  Civil War</ DESCRIPTION > < PRICE >25.00</ PRICE >   < QUANTITY >35</ QUANTITY > </ PRODUCT > </ PRODUCTDATA > <xsd:element name=&quot;PRODUCTNAME&quot; type=&quot;xsd:string&quot;/> <xsd:element name=&quot;DESCRIPTION&quot; type=&quot;xsd:string&quot;/> <xsd:element name=&quot;PRICE&quot; type=&quot;xsd:positiveInteger&quot;/> <xsd:element name=&quot;QUANTITY&quot; type=&quot;xsd:nonNegativeInteger&quot;/>
亅仍亠仄亠仆 弌仍仂亢仆亠 仍亠仄亠仆 弌仍仂亢仆亠 仍亠仄亠仆 仂亟亠亢舒 亟亞亳亠 仍亠仄亠仆, 舒亳弍 亳 仍仂亢仆亶 从仂仆亠仆. 弌亳仆舒从亳: <xsd:complexType name=&quot;data type name&quot;> Content model declaration </xsd:complexType>
亅仍亠仄亠仆 仗亠亟亠仍亠仆亳亠 仆仂于仂亞仂 仗仂仂亞仂 亳仗舒 仆舒 弍舒亰 亠于ム亠亞仂 仗仂仂亞仂 亳仗舒 : <xsd:simpleType name=&quot;phoneno&quot;> <xsd:restriction base=&quot;xsd:string&quot;> <xsd:length value=&quot;8&quot;/> <xsd:pattern value=&quot;{3}-{4}&quot;/> </xsd:restriction> </xsd:simpleType >
亅仍亠仄亠仆 <xsd:simpleType name=&quot;num&quot;> <xsd:restriction base=&quot;xsd:positiveInteger&quot;> <xsd:maxInclusive value=&quot;400&quot;/> <xsd:minInclusive value=&quot;10&quot;/> </xsd:restriction> </xsd:simpleType>
亅仍亠仄亠仆 亅仍亠仄亠仆, 亟仍 仂亞仂, 仂 弍 弍 仂弍磦仍亠仆仆仄 仍仂亢仆仄, 亟仂仍亢亠仆 弍 舒仂亳亳仂于舒仆 仂 仍仂亢仆仄 亳仗仂仄 弌亳仆舒从亳 :  <xsd:element name=ElementName&quot; type=ComplexDataType&quot;/>
亅仍亠仄亠仆 <xsd:complexType name=&quot;prdt&quot;> <xsd:sequence> <xsd:element name=&quot;PRODUCTNAME&quot;  type=&quot;xsd:string&quot;/> <xsd:element name=&quot;DESCRIPTION&quot;  type=&quot;xsd:string&quot;/> <xsd:element name=&quot;PRICE&quot;  type=&quot;xsd:positiveInteger&quot;/> <xsd:element name=&quot;QUANTITY&quot;  type=&quot;xsd:nonNegativeInteger&quot;/> </xsd:sequence> </xsd:complexType>
亠从舒舒亠仄 仂弍亠仆亳亠 仂仍仆仂亠仆仆仂亠 仆仂亠 仂弍亠仆亳亠  XML  亠仄舒仄 仄仂亢亠 亰舒仆 亟仂 4 舒仂于  舒从 仂 仗亠从舒亳仄. 舒仍亳 仆亠 仗仂仄礌仄亳 于仂仗仂: 亳弍 (仂仗亠亟亠仍亠仆亳亠, 亳仗 亰仆舒亠仆亳 亳 亳仗仂仍亰仂于舒仆亳亠) 仂于仂仆仂亠 亳仗仂仍亰仂于舒仆亳亠 仂仗亠亟亠仍亠仆亳亶 于 亟亞亳 亠仄舒 仂舒仆于仂 亳仄仆 丐亳仗 舒亳亠仆亳亶 (束舒亳亠仆亳亠損 亳 束仂亞舒仆亳亠仆亳亠損 亳仗舒)
亟亠 仄仂亢仆仂 亞仍弍亳 于仂亳 亰仆舒仆亳 仗仂  XML  亠仄舒仄 http://www.w3.org Teach Yourself XML in 21 Days Learning XML, 2nd Edition XML tutorial http://www.w3schools.com/w3c/
亟亠 仄仂亢仆仂 亞仍弍亳 于仂亳 亰仆舒仆亳 仗仂  XML  亠仄舒仄  于  Confluence
仗仂仍亰仂于舒仆亳亠 于 仄仂亟仍仆 亠舒 弌仂亰亟舒仆 仗亠亳舒仍仆亶 仗仂亟-仗仂亠从  big-archive-client-docFlow-schemas. 丕 仗仂亠从仂于  big-archive-client-docFlow-engine & big-archive-client-docFlow-scripts  亠 亰舒于亳亳仄仂亳 仂 仆亠亞仂 仂  scope test.
亳仄亠 亳仗仂仍亰仂于舒仆亳 @Test public void testValidateResourcePath() throws XMLSchemaValidationException { XMLSchemaValidator testable = XMLSchemaValidator.newInstance(&quot;ru/magnetosoft/bigarchive/client/docflow/schema/assignment-route.xsd&quot;); testable.validateResourcePath(&quot;ru/magnetosoft/bigarchive/client/docflow/schema/assignment-route.xml&quot;); } @Test(expected=XMLSchemaValidationException.class) public void testValidateXml_InvalidXml() throws XMLSchemaValidationException { XMLSchemaValidator testable = XMLSchemaValidator.newInstance(&quot;ru/magnetosoft/bigarchive/client/docflow/schema/assignment-route.xsd&quot;); testable.validateXml(&quot;<tag></tag>&quot;); }
亠亟仗仂仍舒亞舒亠仄仂亠 亳仗仂仍亰仂于舒仆亳亠 于 仄仂亟仍仆 亠舒 从仍亠从仂于
仂仗仂仍仆亳亠仍仆亠 于仂亰仄仂亢仆仂亳 舒亢亟亶 亠亟舒从仂  XML  亠仄 ( XML Spy & Oxygen )   仄仂亞 仂舒于仍 亠仂于亠 亟舒仆仆亠 仗仂 亠仄亠: .亠. 亞亠仆亠亳仂于舒  XML.

More Related Content

XML Schema

  • 1. XML 亠仄舒 (XML Schema) [email_address] 个亟仂 舒仍从亳仆
  • 2. 个舒亰 亳仗仂仍亰仂于舒仆亳 仂仆亳亞舒亳 (于 仗仂从舒 仆仂仄舒仍仆仂) 仄舒仍仂亠 亳仗仂仍亰仂于舒仆亳亠 从仂亟 仗亳舒仍 仂亟仆亳仄 亠仍仂于亠从仂仄 弍仂仍仂亶 于仂仗仂 仗仂 仆亠仂弍仂亟亳仄仂亳, 于仂仂弍亠 亠弍-亠于亳 (仄亠仍从亳亠 舒仆仆仂亳) 从亳亠 亟亠舒仍亠亶 弍亳弍仍亳仂亠从舒仄亳 JAXB & JAX-WS 仍亠从亳 (仆舒亳仆舒ム 仗仂弍仍亠仄) 丼亂 仄仆仂亞仂 XML 亟舒仆仆 于亳亠 仂弍亠亶 亟仂亞仂于仂仆仆仂亳 仂 仂仄舒舒 XML 亠亞亠亳仂仆仆亠 仂亳弍从亳 仗亳 亳亰仄亠仆亠仆亳亳 仂仄舒仂于 弌仍仂亢仆仂 仗仂亟亟亠亢舒仆亳 仄仂亟仍仆 亠仂于 于 舒从舒仍仆仂仄 仂仂礌亳亳 (仗仂亠从 eks-scripts & docFlow-engine )
  • 3. 丼亂 仄仆仂亞仂 XML 亟舒仆仆 <inbox action=&quot;new-inbox-item&quot; format=&quot;standart&quot;> <from>fromId</from> <to>toId</to> <route>REVIEW</route> <item>docId-123</item> <cause>TO_REVIEW</cause> <to-date>2008-05-15T15:46:49.081+04:00</to-date> <tag>route-id:route-id</tag> <tag>action:review</tag> <tag>reviewer:reviewerId</tag> <tag>parent-route-id:incomingRouteId</tag> <tag>parent-klerk:INCOMING</tag> <extended> <comment>comment</comment> <file-attachment>file-id-01</file-attachment> </extended> <operation type=&quot;reply&quot; id=&quot;reply-yes-no&quot; behaviour=&quot;close-on-reply&quot;> <yes-no> <data-validator klerk=&quot;REVIEW&quot; question=&quot;ValidateData_review&quot;/> </yes-no> </operation> <operation type=&quot;action&quot; id=&quot;action-start-instruction&quot;> <start-workflow workflow='INSTRUCTION'> <parent-route-id>new assigned to review id</parent-route-id> <parent-klerk>REVIEW</parent-klerk> <parent-user>b470e114-a0be-46ee-bba5-aee66c52e349</parent-user> </start-workflow> </operation> </inbox>
  • 4. 于亳亠 仂弍亠亶 亟仂亞仂于仂仆仆仂亳 仂 仂仄舒舒 XML <parent-route-id>parent_route_id</parent-route-id> <parent-klerk>ORDER</parent-klerk> <parent-user>parent_user_id</parent-user> 亳 <tag>route-stage:ASSIGNMENT</tag> <tag>parent-route-id:parentRouteId</tag> <tag>parent-klerk:CONTRACT</tag>
  • 5. 亠亞亠亳仂仆仆亠 仂亳弍从亳 仗亳 亳亰仄亠仆亠仆亳亳 仂仄舒仂于 XML
  • 6. 弌仍仂亢仆仂 仗仂亟亟亠亢舒仆亳 仄仂亟仍仆 亠仂于 于 舒从舒仍仆仂仄 仂仂礌亳亳
  • 7. XML Schema (XML 亠仄舒 ) XML Schema 仆舒亰于舒仆亳亠 舒仆亟舒舒, 仂仄舒 亳 亳仆舒从亳 XML 亟仂从仄亠仆舒, 仂仗亳于舒ム亳亶 XML 从. 仂亢仆仂 从舒亰舒, 仂 仂 仗舒于亳仍舒 (亳仗舒 亠亞仍仆 于舒亢亠仆亳亶). 仂仂仄 仗仂 亳仄 仗舒于亳仍舒仄 仗仂于亠磳 仂仂于亠于亠 仍亳 XML 亟仂从仄亠仆 亳仄 仗舒于亳仍舒仄? XML 亟仂从仄亠仆 仄仂亢亠 舒仄 亰舒磦仍, 仂 仂仆 仂仂于亠于亠 仂仗亠亟亠仍仆仆仂亶 亠仄亠.
  • 8. 舒从亳亠 仗仂弍仍亠仄 亠亳 仂仄亠仆舒仍仆舒 仗仂于亠从舒 亠于ム亳 XML 仆舒 仂仂于亠于亳亠 仆仂于仄 仗舒于亳仍舒仄 (弍舒 从仂亠从亳仂于从舒 从仂亟仂于 仗仂 仗仂于舒仍亳于亳仄 亠舒仄) 亟亳仆仂仂弍舒亰亳亠 XML 亟舒仆仆 仄亠仆亠仆亳亠 从仂仍亳亠于舒 亳 仗仂亠仆亳亠 从仂亟舒 仗仂 舒弍仂亠 XML 弌仂亰亟舒仆亳亠 仂弍亠亞仂 仍仂于舒 舒仆舒仍亳亳从舒仄亳, 从仂仂亠 于 亢亠 仂 亰仆舒 从舒从亳亠 亟舒仆仆亠 仗亠亠亟舒ム 仄亠亢亟 从仍亠从舒仄亳.
  • 9. XML 亟仂从仄亠仆 仂 亠仄仂亶 <rootElement xmlns=&quot;http://ru.sefer/schema/1&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://ru.sefer/schema/1 http://ru.sefer/schema/1.xsd&quot; > xmlns 仗仂舒仆于仂 亳仄仆 仗仂-仄仂仍舒仆亳 schemaLocation 仄亠仂仗仂仍仂亢亠仆亳亠 亠仄
  • 10. 于亠亟亠仆亳亠 弌亠仄舒 仂仗亠亟亠仍磳 仗亳仂从 仍亠仄亠仆仂于 亳 舒亳弍仂于, 从仂仂亠 仄仂亞 弍 亳仗仂仍亰仂于舒仆 于 亟仂从仄亠仆亠. 仆舒 舒从亢亠 仂仗亠亟亠仍磳 仗仂磲仂从, 于 从仂仂仂仄 仂仆亳 仗仂磦仍ム 于 XML 亳 亳 亳仗. 亊亰从 仂仗亳舒仆亳 XML Schema XML Schema Definition (XSD)
  • 11. 亠亳仄亠于舒 XSD 仂弍亠仗亠亳于舒亠 弍仂仍亠 从仂仆仂仍 仆舒亟 从仂亶 亳 亳仗舒仄亳, 亠仄 DTD . XSD 仗仂亰于仂仍磳 仂亰亟舒于舒 仂弍于亠仆仆亠 亳仗 亟舒仆仆. XSD 仗仂亰于仂仍磳 仆舒从仍舒亟于舒 仂亞舒仆亳亠仆亳 仆舒 亟舒仆仆亠. 弌亳仆舒从亳 亠仄 舒从仂亶 亢亠 从舒从 舒仄仂亞仂 亟仂从仄亠仆舒 - XML . XML 亠仄舒 舒亳磳仄舒.
  • 14. 丐亳仗 亟舒仆仆 丐亳仗 亟舒仆仆 仂仗亠亟亠仍磳, 仂 仄仂亢亠 舒仆亳 于仆亳 仍亠仄亠仆舒 . XSD 仗亠亟仂舒于仍磳 磲 仗亠亟仂仗亠亟亠仍仆仆 亳仗仂于, 从仂仂亠 仄仂亢仆仂 从仍舒亳亳亳仂于舒 舒从 : 亳仄亳亳于仆亠 : 弍舒亰仂于亠 亳仗 . 舒仍亠亟仂于舒仆仆亠 : 仂仗亠亟亠仍亠仆 亳仗仂仍亰仂于舒仆亳亠仄 亟亞亳 亳仗仂于 (仆舒亰于舒亠仄 束弍舒亰仂于仄亳損) 仂仄舒仆亠 : 仗亳仄亳亳于仆亠 亳仍亳 仆舒仍亠亟仂于舒仆仆亠, 从仂仂亠 仆亠 仄仂亞 弍 舒亰弍亳 仆舒 弍仂仍亠亠 仄亠仍从亳亠 从从亳 弌仗亳从亳 : 仆舒仍亠亟仂于舒仆仆亶 亳仗, 仂亟亠亢舒亳亶 亠亳 舒仂仄舒仆 弍亠亟亳仆仆仆亠 : 亠亰仍舒 仂弍亠亟亳仆亠仆亳 舒仂仄舒仆 亳仗仂于 亳 仗亳从仂于
  • 15. 亅仍亠仄亠仆 弌亠于亠 2 亳仗 仍亠仄亠仆仂于: 仗仂亠 亳 仍仂亢仆亠. 仂仂亶 仍亠仄亠仆 仂仂亶 仍亠仄亠仆 仆亠 仂亟亠亢亳 舒亳弍仂于 亳仍亳 亟仂亠仆亳 亰仍仂于 弌亳仆舒从亳 仂弍磦仍亠仆亳 仗仂仂亞仂 仍仄亠仆舒 : <xsd:element name=&quot;element-name&quot; type=&quot;data type&quot; minOccurs=&quot;nonNegativeInteger&quot; maxOccurs=&quot;nonNegativeInteger|unbounded&quot;/>
  • 16. < PRODUCTDATA > < PRODUCT PRODUCTID =&quot;P001&quot; CATEGORY =&quot;BOOKS&quot;> < PRODUCTNAME >Gone With the Wind</ PRODUCTNAME > < DESCRIPTION > The backdrop of this book is the American Civil War</ DESCRIPTION > < PRICE >25.00</ PRICE > < QUANTITY >35</ QUANTITY > </ PRODUCT > </ PRODUCTDATA > <xsd:element name=&quot;PRODUCTNAME&quot; type=&quot;xsd:string&quot;/> <xsd:element name=&quot;DESCRIPTION&quot; type=&quot;xsd:string&quot;/> <xsd:element name=&quot;PRICE&quot; type=&quot;xsd:positiveInteger&quot;/> <xsd:element name=&quot;QUANTITY&quot; type=&quot;xsd:nonNegativeInteger&quot;/>
  • 17. 亅仍亠仄亠仆 弌仍仂亢仆亠 仍亠仄亠仆 弌仍仂亢仆亠 仍亠仄亠仆 仂亟亠亢舒 亟亞亳亠 仍亠仄亠仆, 舒亳弍 亳 仍仂亢仆亶 从仂仆亠仆. 弌亳仆舒从亳: <xsd:complexType name=&quot;data type name&quot;> Content model declaration </xsd:complexType>
  • 18. 亅仍亠仄亠仆 仗亠亟亠仍亠仆亳亠 仆仂于仂亞仂 仗仂仂亞仂 亳仗舒 仆舒 弍舒亰 亠于ム亠亞仂 仗仂仂亞仂 亳仗舒 : <xsd:simpleType name=&quot;phoneno&quot;> <xsd:restriction base=&quot;xsd:string&quot;> <xsd:length value=&quot;8&quot;/> <xsd:pattern value=&quot;{3}-{4}&quot;/> </xsd:restriction> </xsd:simpleType >
  • 19. 亅仍亠仄亠仆 <xsd:simpleType name=&quot;num&quot;> <xsd:restriction base=&quot;xsd:positiveInteger&quot;> <xsd:maxInclusive value=&quot;400&quot;/> <xsd:minInclusive value=&quot;10&quot;/> </xsd:restriction> </xsd:simpleType>
  • 20. 亅仍亠仄亠仆 亅仍亠仄亠仆, 亟仍 仂亞仂, 仂 弍 弍 仂弍磦仍亠仆仆仄 仍仂亢仆仄, 亟仂仍亢亠仆 弍 舒仂亳亳仂于舒仆 仂 仍仂亢仆仄 亳仗仂仄 弌亳仆舒从亳 : <xsd:element name=ElementName&quot; type=ComplexDataType&quot;/>
  • 21. 亅仍亠仄亠仆 <xsd:complexType name=&quot;prdt&quot;> <xsd:sequence> <xsd:element name=&quot;PRODUCTNAME&quot; type=&quot;xsd:string&quot;/> <xsd:element name=&quot;DESCRIPTION&quot; type=&quot;xsd:string&quot;/> <xsd:element name=&quot;PRICE&quot; type=&quot;xsd:positiveInteger&quot;/> <xsd:element name=&quot;QUANTITY&quot; type=&quot;xsd:nonNegativeInteger&quot;/> </xsd:sequence> </xsd:complexType>
  • 22. 亠从舒舒亠仄 仂弍亠仆亳亠 仂仍仆仂亠仆仆仂亠 仆仂亠 仂弍亠仆亳亠 XML 亠仄舒仄 仄仂亢亠 亰舒仆 亟仂 4 舒仂于 舒从 仂 仗亠从舒亳仄. 舒仍亳 仆亠 仗仂仄礌仄亳 于仂仗仂: 亳弍 (仂仗亠亟亠仍亠仆亳亠, 亳仗 亰仆舒亠仆亳 亳 亳仗仂仍亰仂于舒仆亳亠) 仂于仂仆仂亠 亳仗仂仍亰仂于舒仆亳亠 仂仗亠亟亠仍亠仆亳亶 于 亟亞亳 亠仄舒 仂舒仆于仂 亳仄仆 丐亳仗 舒亳亠仆亳亶 (束舒亳亠仆亳亠損 亳 束仂亞舒仆亳亠仆亳亠損 亳仗舒)
  • 23. 亟亠 仄仂亢仆仂 亞仍弍亳 于仂亳 亰仆舒仆亳 仗仂 XML 亠仄舒仄 http://www.w3.org Teach Yourself XML in 21 Days Learning XML, 2nd Edition XML tutorial http://www.w3schools.com/w3c/
  • 24. 亟亠 仄仂亢仆仂 亞仍弍亳 于仂亳 亰仆舒仆亳 仗仂 XML 亠仄舒仄 于 Confluence
  • 25. 仗仂仍亰仂于舒仆亳亠 于 仄仂亟仍仆 亠舒 弌仂亰亟舒仆 仗亠亳舒仍仆亶 仗仂亟-仗仂亠从 big-archive-client-docFlow-schemas. 丕 仗仂亠从仂于 big-archive-client-docFlow-engine & big-archive-client-docFlow-scripts 亠 亰舒于亳亳仄仂亳 仂 仆亠亞仂 仂 scope test.
  • 26. 亳仄亠 亳仗仂仍亰仂于舒仆亳 @Test public void testValidateResourcePath() throws XMLSchemaValidationException { XMLSchemaValidator testable = XMLSchemaValidator.newInstance(&quot;ru/magnetosoft/bigarchive/client/docflow/schema/assignment-route.xsd&quot;); testable.validateResourcePath(&quot;ru/magnetosoft/bigarchive/client/docflow/schema/assignment-route.xml&quot;); } @Test(expected=XMLSchemaValidationException.class) public void testValidateXml_InvalidXml() throws XMLSchemaValidationException { XMLSchemaValidator testable = XMLSchemaValidator.newInstance(&quot;ru/magnetosoft/bigarchive/client/docflow/schema/assignment-route.xsd&quot;); testable.validateXml(&quot;<tag></tag>&quot;); }
  • 28. 仂仗仂仍仆亳亠仍仆亠 于仂亰仄仂亢仆仂亳 舒亢亟亶 亠亟舒从仂 XML 亠仄 ( XML Spy & Oxygen ) 仄仂亞 仂舒于仍 亠仂于亠 亟舒仆仆亠 仗仂 亠仄亠: .亠. 亞亠仆亠亳仂于舒 XML.