There's really too much schema here to easily
comment on. As you have a fairly basic question you may find some of the
XML schema overviews on the net useful.
We have a simple overview at:
It's not intended to cover everything about XSD,
but will hopefully get you started.
The W3C XML Schema primer should also help (you
shouldn't need to read it all to start with). It is at:
Getting an XML Schema aware editor may also
help. I believe Microsoft Express Editions of Visual Studio (Free) include
the schema editor, and this would be helpful.
HTH,
----- Original Message -----
Sent: Tuesday, February 05, 2008 8:44
PM
Subject: [xml-dev] re[xml-dev] ferencing
an already declared element in the schema(not a global element)
The following is my schema: For <xs:element
name="aliasLookUpType"> how can I reuse elements "name_first"
"arrestee_dob" instead of "name_first_lookup" and
"arrestee_dob_lookup"
I understand that only a global element can be
reused instead of something declared in a complexType.
Is there a
way to refer to "name_first"?
<xs:element
name="output"> <xs:complexType> <xs:sequence> <xs:element
name="name_last" type="xs:string"/> <xs:element name="name_first"
type="xs:string"/> <xs:element name="name_suffix"
type="xs:string"/> <xs:element name="name_middle"
type="xs:string"/> <xs:element name="address_street_2"
type="xs:string"/> <xs:element name="address_street_1"
type="xs:string"/> <xs:element name="address_po_box"
type="xs:string"/> <xs:element name="address_city"
type="xs:string"/> <xs:element name="address_county"
type="xs:string"/> <xs:element name="address_state"
type="xs:string"/> <xs:element name="address_zip"
type="xs:string"/> <xs:element name="address_country"
type="xs:string"/> <xs:element name="incident_date_to"
type="xs:date"/> <xs:element name="sub_incident_date_to"
type="xs:date"/> <xs:element name="incident_date_from"
type="xs:date"/> <xs:element name="officer_name"
type="xs:string"/> <xs:element name="vehicle_state_issued"
type="xs:string"/> <xs:element name="vehicle_color"
type="xs:string"/> <xs:element name="vehicle_model"
type="xs:string"/> <xs:element name="vehicle_make"
type="xs:string"/> <xs:element name="vehicle_year"
type="xs:string"/> <xs:element name="vehicle_inspection_sticker"
type="xs:string"/> <xs:element name="vehicle_VIN"
type="xs:string"/> <xs:element name="vehicle_license_plate"
type="xs:string"/> <xs:element name="Vehicle_Information_Text"
type="xs:string"/> <xs:element name="incident_time"
type="xs:string"/> <xs:element name="type_complaint"
type="xs:string"/> <xs:element name="arrest_type"
type="xs:string"/> <xs:element name="officer_department"
type="xs:string"/> <xs:element name="id_ccr"
type="xs:string"/> <xs:element name="id_livescan_no"
type="xs:string"/> <xs:element name="incident_location"
type="xs:string"/> <xs:element name="arrest_location"
type="xs:string"/> <xs:element name="arrestee_dob"
type="xs:date"/> <xs:element name="id_drivers_license"
type="xs:string"/> <xs:element name="licensure_state"
type="xs:string"/> <xs:element name="arrest_classification"
type="xs:string"/> <xs:element name="id_ssn" type="xs:string"/>
<xs:element name="phys_desc_build"
type="xs:string"/> <xs:element name="phys_desc_hair"
type="xs:string"/> <xs:element name="phys_desc_eyes"
type="xs:string"/> <xs:element name="phys_desc_sex"
type="xs:string"/> <xs:element name="phys_desc_race"
type="xs:string"/> <xs:element name="phys_desc_weight"
type="xs:string"/> <xs:element name="phys_desc_height"
type="xs:string"/> <xs:element name="id_center"
type="xs:string"/> <xs:element name="id_idnum"
type="xs:string"/>
<xs:element name="arrest_time"
type="xs:string"/>
<xs:element name="arrest_date"
type="xs:date"/>
<xs:element name="take_defendant" type="xs:string"/> <xs:element
name="arrestee_age"
type="xs:string"/>
<xs:element name="controls_save"
type="xs:string"/>
<xs:element name="super_review_decision"
type="xs:string"/>
<xs:element
name="Supervisor_Review_Decision_Text" type="xs:string"/>
<xs:element name="SUPERVISOR_REVIEW_Text"
type="xs:string"/>
<xs:element name="super_review_comments"
type="xs:string"/>
<xs:element name="da_review_decision"
type="xs:string"/>
<xs:element name="DA_Decision_Text"
type="xs:string"/>
<xs:element name="DA_REVIEW_Text"
type="xs:string"/>
<xs:element name="da_review_comments"
type="xs:string"/> <xs:element name="affadavit_magistrate"
type="xs:string"/>
<xs:element
name="affadavit_accuse_unknown" type="xs:string"/>
<xs:element name="affadavit_narrative"
type="xs:string"/>
<xs:element name="I_accuse_John_Doe_Text"
type="xs:string"/>
<xs:element
name="I_accuse_name_unknown_Text" type="xs:string"/>
<xs:element
name="I_accuse_the_above_Text" type="xs:string"/>
<xs:element name="affadavit_accuse_above"
type="xs:string"/>
<xs:element name="Spell_Check_Aff_Text"
type="xs:string"/>
<xs:element
name="AFFADAVIT_NARRATIVE_Text" type="xs:string"/>
<xs:element
name="affadavit_date_how_both_know" type="xs:string"/>
<xs:element name="How_both_knows_Text"
type="xs:string"/>
<xs:element
name="affadavit_how_source_knows" type="xs:string"/>
<xs:element name="How_source_know_Text"
type="xs:string"/>
<xs:element
name="affadavit_how_affiant_knows" type="xs:string"/>
<xs:element name="How_Affiant_knows_Text"
type="xs:string"/>
<xs:element
name="Same_as_Arrest_Date_Text2" type="xs:string"/>
<xs:element
name="affadavit_date_source_received_info" type="xs:date"/>
<xs:element
name="Date_source_received_info_Text" type="xs:string"/>
<xs:element
name="Same_as_Arrest_Date_Text" type="xs:string"/>
<xs:element
name="affadavit_date_affiant_received_info" type="xs:date"/>
<xs:element
name="Date_Affiant_received_info_Text" type="xs:string"/>
<xs:element name="WHEN_Text"
type="xs:string"/>
<xs:element name="HOW_Text"
type="xs:string"/>
<xs:element
name="AFFADAVIT_INFORMATION_Text" type="xs:string"/>
<xs:element
name="affadavit_other_participants" type="xs:string"/>
<xs:element name="Other_Participants_Do_not_include_above_Defendant"
type="xs:string"/>
<xs:element name="affadavit_accuse_doe"
type="xs:string"/>
<xs:element name="affadavit_unknown_desc"
type="xs:string"/>
<xs:element
name="COMPLAINT_INFORMATION_Text" type="xs:string"/>
<xs:element name="Create_Offenses_Text"
type="xs:string"/>
<xs:element name="ADDVIE_ALIASES_Text"
type="xs:string"/>
<xs:element name="id_otn"
type="xs:string"/>
<xs:element name="source_presumed"
type="xs:boolean"/>
<xs:element name="source_information"
type="xs:boolean"/>
<xs:element name="defendant_reputation"
type="xs:boolean"/>
<xs:element name="source_declaration"
type="xs:boolean"/>
<xs:element name="affiant_corroborates"
type="xs:boolean"/>
<xs:element name="Arrestee_Info_text"
type="xs:string"/> <xs:element name="ex_123456789_Text"
type="xs:string"/>
<xs:element name="Affiant_and__or_other_Police_Officers_Text"
type="xs:string"/>
<xs:element
name="This_source_made_declaration_Text" type="xs:string"/>
<xs:element
name="Source_has_given_information_Text" type="xs:boolean"/>
<xs:element
name="Defendants_reputation_Text" type="xs:boolean"/>
<xs:element
name="Source_is_presumed_reliable_Text" type="xs:boolean"/>
<xs:element
name="Please_check_all_that_apply_Text" type="xs:string"/>
<xs:element
name="why_affiant_believes_Text" type="xs:string"/>
<xs:element name="Refresh_Offenses_Text"
type="xs:string"/>
<xs:element name="Add_View_Dialog_Message_ARRESTEE_INFORMATION_70"
type="xs:string"/>
<xs:element
name="Arrestee_Alias_ARRESTEE_INFORMATION_71" type="xs:string"/>
<xs:element name="aliasLookUpType">
<xs:complexType>
<xs:sequence>
<xs:element name="name_last_lookup" type="xs:string"/>
<xs:element name="id_ssn_lookup" type="xs:string"/>
<xs:element name="arrestee_dob_lookup" type="xs:date"/>
</xs:sequence>
</xs:complexType> </xs:element>
</xs:sequence>
<xs:attribute name="taskId" type="xs:string"/> <xs:attribute
name="participantToken" type="xs:string"/> <xs:attribute name="user"
type="xs:string"/> <xs:attribute name="formUrl"
type="xs:string"/>
</xs:complexType>
</xs:element>
<xs:element
name="input"> <xs:complexType> <xs:sequence> <xs:element
name="name_last" type="xs:string"/> <xs:element name="name_first"
type="xs:string"/> <xs:element name="name_suffix"
type="xs:string"/> <xs:element name="name_middle"
type="xs:string"/> <xs:element name="address_street_2"
type="xs:string"/> <xs:element name="address_street_1"
type="xs:string"/> <xs:element name="address_po_box"
type="xs:string"/> <xs:element name="address_city"
type="xs:string"/> <xs:element name="address_county"
type="xs:string"/> <xs:element name="address_state"
type="xs:string"/> <xs:element name="address_zip"
type="xs:string"/> <xs:element name="address_country"
type="xs:string"/> <xs:element name="incident_date_to"
type="xs:string"/> <xs:element name="sub_incident_date_to"
type="xs:date"/> <xs:element name="incident_date_from"
type="xs:string"/> <xs:element name="officer_name"
type="xs:string"/> <xs:element name="vehicle_state_issued"
type="xs:string"/> <xs:element name="vehicle_color"
type="xs:string"/> <xs:element name="vehicle_model"
type="xs:string"/> <xs:element name="vehicle_make"
type="xs:string"/> <xs:element name="vehicle_year"
type="xs:string"/> <xs:element name="vehicle_inspection_sticker"
type="xs:string"/> <xs:element name="vehicle_VIN"
type="xs:string"/> <xs:element name="vehicle_license_plate"
type="xs:string"/> <xs:element name="Vehicle_Information_Text"
type="xs:string"/> <xs:element name="incident_time"
type="xs:string"/> <xs:element name="type_complaint"
type="xs:string"/> <xs:element name="arrest_type"
type="xs:string"/> <xs:element name="officer_department"
type="xs:string"/> <xs:element name="id_ccr"
type="xs:string"/> <xs:element name="id_livescan_no"
type="xs:string"/> <xs:element name="incident_location"
type="xs:string"/> <xs:element name="arrest_location"
type="xs:string"/> <xs:element name="arrestee_dob"
type="xs:date"/> <xs:element name="id_drivers_license"
type="xs:string"/> <xs:element name="licensure_state"
type="xs:string"/> <xs:element name="arrest_classification"
type="xs:string"/> <xs:element name="id_ssn" type="xs:string"/>
<xs:element name="phys_desc_build"
type="xs:string"/> <xs:element name="phys_desc_hair"
type="xs:string"/> <xs:element name="phys_desc_eyes"
type="xs:string"/> <xs:element name="phys_desc_sex"
type="xs:string"/> <xs:element name="phys_desc_race"
type="xs:string"/> <xs:element name="phys_desc_weight"
type="xs:string"/> <xs:element name="phys_desc_height"
type="xs:string"/> <xs:element name="id_center"
type="xs:string"/> <xs:element name="id_idnum"
type="xs:string"/>
<xs:element name="arrest_time"
type="xs:string"/>
<xs:element name="arrest_date"
type="xs:date"/>
<xs:element name="take_defendant" type="xs:string"/> <xs:element
name="arrestee_age"
type="xs:string"/>
<xs:element name="controls_save"
type="xs:string"/>
<xs:element name="super_review_decision"
type="xs:string"/>
<xs:element
name="Supervisor_Review_Decision_Text" type="xs:string"/>
<xs:element name="SUPERVISOR_REVIEW_Text"
type="xs:string"/>
<xs:element name="super_review_comments"
type="xs:string"/>
<xs:element name="da_review_decision"
type="xs:string"/>
<xs:element name="DA_Decision_Text"
type="xs:string"/>
<xs:element name="DA_REVIEW_Text"
type="xs:string"/>
<xs:element name="da_review_comments"
type="xs:string"/> <xs:element name="affadavit_magistrate"
type="xs:string"/>
<xs:element
name="affadavit_accuse_unknown" type="xs:string"/>
<xs:element name="affadavit_narrative"
type="xs:string"/>
<xs:element name="I_accuse_John_Doe_Text"
type="xs:string"/>
<xs:element
name="I_accuse_name_unknown_Text" type="xs:string"/>
<xs:element
name="I_accuse_the_above_Text" type="xs:string"/>
<xs:element name="affadavit_accuse_above"
type="xs:string"/>
<xs:element name="Spell_Check_Aff_Text"
type="xs:string"/>
<xs:element
name="AFFADAVIT_NARRATIVE_Text" type="xs:string"/>
<xs:element
name="affadavit_date_how_both_know" type="xs:string"/>
<xs:element name="How_both_know_Text"
type="xs:string"/>
<xs:element
name="affadavit_how_source_knows" type="xs:string"/>
<xs:element name="How_source_knows_Text"
type="xs:string"/>
<xs:element
name="affadavit_how_affiant_knows" type="xs:string"/>
<xs:element name="How_Affiant_knows_Text"
type="xs:string"/>
<xs:element
name="Same_as_Arrest_Date_Text2" type="xs:string"/>
<xs:element
name="affadavit_date_source_received_info" type="xs:date"/>
<xs:element
name="Date_source_received_info_Text" type="xs:string"/>
<xs:element
name="Same_as_Arrest_Date_Text" type="xs:string"/>
<xs:element
name="affadavit_date_affiant_received_info" type="xs:date"/>
<xs:element
name="Date_Affiant_received_info_Text" type="xs:string"/>
<xs:element name="WHEN_Text"
type="xs:string"/>
<xs:element name="HOW_Text"
type="xs:string"/>
<xs:element
name="AFFADAVIT_INFORMATION_Text" type="xs:string"/>
<xs:element
name="affadavit_other_participants" type="xs:string"/>
<xs:element name="Other_Participants_Do_not_include_above_Defendant"
type="xs:string"/>
<xs:element name="affadavit_accuse_doe"
type="xs:string"/>
<xs:element name="affadavit_unknown_desc"
type="xs:string"/>
<xs:element
name="COMPLAINT_INFORMATION_Text" type="xs:string"/>
<xs:element name="Create_Offenses_Text"
type="xs:string"/>
<xs:element name="ADDVIE_ALIASES_Text"
type="xs:string"/>
<xs:element name="id_otn"
type="xs:string"/>
<xs:element name="source_presumed"
type="xs:boolean"/>
<xs:element name="source_information"
type="xs:boolean"/>
<xs:element name="defendant_reputation"
type="xs:boolean"/>
<xs:element name="source_declaration"
type="xs:boolean"/>
<xs:element name="affiant_corroborates"
type="xs:boolean"/>
<xs:element name="Arrestee_Info_text"
type="xs:string"/> <xs:element name="ex_123456789_Text"
type="xs:string"/>
<xs:element name="Affiant_and__or_other_Police_Officers_Text"
type="xs:string"/>
<xs:element
name="This_source_made_declaration_Text" type="xs:string"/>
<xs:element
name="Source_has_given_information_Text" type="xs:string"/>
<xs:element
name="Defendants_reputation_Text" type="xs:string"/>
<xs:element
name="Source_is_presumed_reliable_Text" type="xs:string"/>
<xs:element
name="Please_check_all_that_apply_Text" type="xs:string"/>
<xs:element
name="why_affiant_believes_Text" type="xs:string"/>
<xs:element name="Refresh_Offenses_Text"
type="xs:string"/>
<xs:element name="Add_View_Dialog_Message_ARRESTEE_INFORMATION_70"
type="xs:string"/>
<xs:element
name="Arrestee_Alias_ARRESTEE_INFORMATION_71" type="xs:string"/>
<xs:element name="aliasLookUpType">
<xs:complexType>
<xs:sequence>
<xs:element name="name_last_lookup" type="xs:string"/>
<xs:element name="id_ssn_lookup" type="xs:string"/>
<xs:element name="arrestee_dob_lookup" type="xs:date"/>
</xs:sequence>
</xs:complexType> </xs:element>
</xs:sequence>
</xs:complexType>
-- View this message in context: http://www.nabble.com/referencing-an-already-declared-element-in-the-schema%28not-a-global-element%29-tp15299083p15299083.html Sent
from the Xml.org Dev mailing list archive at
Nabble.com.
_______________________________________________________________________
XML-DEV
is a publicly archived, unmoderated list hosted by OASIS to support XML
implementation and development. To minimize spam in the archives, you must
subscribe before posting.
[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/ Or
unsubscribe: xml-dev-unsubscribe@lists.xml.org subscribe:
xml-dev-subscribe@lists.xml.org List
archive: http://lists.xml.org/archives/xml-dev/ List
Guidelines: http://www.oasis-open.org/maillists/guidelines.php
|