-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathschema.rs
32 lines (31 loc) · 1.16 KB
/
schema.rs
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
use crate::xsd::{
attribute, attribute_group, complex_type, element, group, import, qualification, simple_type,
};
#[derive(Clone, Default, Debug, PartialEq, YaDeserialize)]
#[yaserde(
root="schema"
prefix="xs",
namespace="xs: http://www.w3.org/2001/XMLSchema",
)]
pub struct Schema {
#[yaserde(rename = "targetNamespace", attribute)]
pub target_namespace: Option<String>,
#[yaserde(rename = "elementFormDefault", attribute)]
pub element_form_default: Option<qualification::Qualification>,
#[yaserde(rename = "attributeFormDefault", attribute)]
pub attribute_form_default: Option<qualification::Qualification>,
#[yaserde(rename = "import")]
pub imports: Vec<import::Import>,
#[yaserde(rename = "element")]
pub elements: Vec<element::Element>,
#[yaserde(rename = "simpleType")]
pub simple_type: Vec<simple_type::SimpleType>,
#[yaserde(rename = "complexType")]
pub complex_type: Vec<complex_type::ComplexType>,
#[yaserde(rename = "attribute")]
pub attributes: Vec<attribute::Attribute>,
#[yaserde(rename = "attributeGroup")]
pub attribute_group: Vec<attribute_group::AttributeGroup>,
#[yaserde(rename = "group")]
pub group: Vec<group::Group>,
}