Если я правильно понимаю, то использование xsd-схемы позволяет маркировать тегами в тесте документа Word "поля" по которым можно будет осуществлять поиск и т.д. после сохранения вордовского документа как xml-документа.
У меня есть рабочая xsd-схема для залежи месторождения.
Есть документ ворда с тестом по залежи. Я подключил к нему свою схему. Я так понимаю, что можно маркивать слова в тесте. У меня не получается делать разиметку в произвольном тесте. Ворд ругается на последовательность и т.д.
Можно ли как-нибудь сделать маркировку данных в произвольном тексте? Чтобы потом я мог обращаться к полям в xml документе?
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
<?xml version="1.0" encoding="windows-1251"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:simpleType name="TTypeZaleg">
<xs:restriction base="xs:string">
<xs:enumeration value="газовая"/>
<xs:enumeration value="нефтяная"/>
<xs:enumeration value="нефтегазовая"/>
</xs:restriction>
</xs:simpleType>
<xs:complexType name="TPeriod">
<xs:sequence>
<xs:element name="Begin" type="xs:date">
<xs:annotation>
<xs:documentation>Дата начала периода</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TUse_Status">
<xs:sequence>
<xs:element name="Test_Use_Period" type="TPeriod" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Период пробной эксплуатации</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Experience_Industrial_Use_Period" type="TPeriod" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Период опытно-промышленной эксплуатации</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Grow_Extraction_Period" type="TPeriod" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Период нарастающей добычи</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Constant_Extraction_Period" type="TPeriod" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Период постоянной добычи</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Fall_Extraction_Period" type="TPeriod" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Период падающей добычи</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Liquidation_Period" type="TPeriod" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Период ликвидирования</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TUse_Zapas">
<xs:sequence>
<xs:element name="GazA" type="xs:integer" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Газ (А)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="GazB" type="xs:integer" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Газ (B)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="GazC1" type="xs:integer" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Газ (C1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CondensatA" type="xs:integer" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Конденсат (А)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CondensatB" type="xs:integer" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Конденсат (B)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="CondensatC1" type="xs:integer" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Конденсат (C1)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NeftA" type="xs:integer" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Нефть (А)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NeftB" type="xs:integer" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Нефть (B)</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="NeftC1" type="xs:integer" minOccurs="0" maxOccurs="1">
<xs:annotation>
<xs:documentation>Нефть (C1)</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="TZaleg">
<xs:sequence>
<xs:element name="Full_Name_Zaleg" type="xs:string">
<xs:annotation>
<xs:documentation>Полное название залежи</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="TypeZaleg" type="TTypeZaleg">
<xs:annotation>
<xs:documentation>Тип залежи</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="StatusUses" type="TUse_Status">
<xs:annotation>
<xs:documentation>Состояние разработки</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Use_Zapas" type="TUse_Zapas">
<xs:annotation>
<xs:documentation>Разведанные запасы</xs:documentation>
</xs:annotation>
</xs:element>
<xs:element name="Comment" type="xs:string">
<xs:annotation>
<xs:documentation>Примечание</xs:documentation>
</xs:annotation>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:element name="Root" type="TZaleg"/>
</xs:schema>