我如何正确地将多个实体集成到我的 DTD 中? (XML)
How do I properly integrate multiple entities into my DTD? (with XML)
对于一门学科,我应该同时制作 XML 和 DTD。起初我将实体分开放在不同的文件中,但他们更喜欢我将其整合,以便清楚地显示连接。
这几天我一直在努力理解它是如何工作的,但似乎无法解决。我很难理解我在做什么,无论是对还是错,以及如何显示这些联系。如果我尝试验证工作,它会立即在第三行出错。
<?xml version="1.0"?>
<!DOCTYPE bon>
<!ELEMENT precondition (RD_POLICY, CONNECTION_WITH_DSNS, CAPACITEIT)>
<!ELEMENT RD_POLICY (#PCDATA)>
<!ELEMENT CONNECTION_WITH_DSNS (#PCDATA)>
<!ELEMENT BUDGET (#PCDATA)>
<!ELEMENT CAPACITEIT (#PCDATA)>
<PRECONDITION>
<RD_POLICY>Version 4</RD_POLICY>
<CONNECTION_WITH_DSNS>Partner Firm</CONNECTION_WITH_DSNS>
<BUDGET>€200000</BUDGET>
<CAPACITEIT>€2K mede-als 15 medewerkers gedurende 13 weken minimum</CAPACITEIT>
</PRECONDITION>
<!ELEMENT project_proposal (DOCUMENT_ID, NAME, COMPANY_NAME, ACTIVITY, DELIVERY, AIM, TYPE)>
<!ELEMENT DOCUMENT_ID (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT COMPANY_NAME (#PCDATA)>
<!ELEMENT ACTIVITY (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT AIM (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>
<PROJECT_PROPOSAL>
<DOCUMENT_ID>3</DOCUMENT_ID>
<NAME>Vessel Restructure Program (VRP)</NAME>
<COMPANY_NAME>Amels</COMPANY_NAME>
<ACTIVITY>Restructuring of the vessel Hoensma</ACTIITY>
<DELIVERY>31-12-2022</DELIVERY>
<AIM>Restore integrity of hull vessel Hoensma</AIM>
<TYPE>Repair</TYPE>
</PROJECT_PROPOSAL>
<!ELEMENT project_application_form (GOAL, STAFF, BUDGET, EK_NUMBER, NAME, DATA)>
<!ELEMENT GOAL (#PCDATA)>
<!ELEMENT STAFF (#PCDATA)>
<!ELEMENT BUDGET (#PCDATA)>
<!ELEMENT EK_NUMBER (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMT DATA (#PCDATA)>
<PROJECT_APPLICATION_FORM>
<GOAL>To restructure the hull of the vessel Hoensma</GOAL>
<STAFF>Marco Jansse plus crew</STAFF>
<BUDGET>€500000</BUDGET>
<EK_NUMBER>761396773</EK_NUMBER>
<NAME>Vessel Restructure Program (VRP)</NAME>
<DATE>26-03-2019</DATE>
</PROJECT_APPLICATION_FORM>
<!ELEMENT requirements_form(MINIMUM_REQUIREMENTS, FITTING_BUDGET, CAPACITY_REQUIRED)>
<!ELEMENT MINIMUM_REQUIREMENTS (#PCDATA)>
<!ELEMENT FITTING_BUDGET (#PCDATA)>
<!ELEMENT CAPACITY_REQUIRED (#PCDATA)>
]>
<REQUIREMENTS_FORM>
<MINIMUM_REQUIREMENTS>The project has a maximum time of 6 months, if time is insufficient, cancel the project</MINIMUM_REQUIREMENTS>
<FITTING_BUDGET>The budget has been calculated to be within the €35.000 to €55.000 range</FITTING_BUDGET>
<CAPACITY_REQUIRED>The number of workers that are available is 25</CAPACITY_REQUIRED>
</REQUIREMENTS_FORM>
<!ELEMENT external_partner (NAME, COMPANY)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT COMPANY (#PCDATA)>
<EXTERNAL_PARTNER>
<NAME>Vessel Restructure Program (VRP)</NAME>
<COMPANY_NAME>Amels</COMPANY_NAME>
</EXTERNAL_PARTNER>
<!ELEMENT report (NUMBER, DELIVERY, STATUS, NAME)>
<!ELEMENT NUMBER (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<REPORT>
<NUMBER>4</NUMBER>
<DELIVERY>23-07-2019</DELIVERY>
<STATUS>On schedule, 17% completed</STATUS>
<NAME> Vessel Restructure Program (VRP)</NAME>
</REPORT>
<!ELEMENT project_manager_research (NAAM, ID)>
<!ELEMENT NAAM (#PCDATA)>
<!ELEMENT ID (#PCDATA)>
<PROJECT_MANAGER_RESEARCH>
<NAAM>Joep Broekhuijsen</NAAM>
<ID>379168</ID>
</PROJECT_MANAGER_RESEARCH>
<!ELEMENT feedback (DOCUMENT_ID, NAME, TYPE)>
<!ELEMENT DOCUMENT_ID (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>
<FEEDBACK>
<DOCUMENT_ID>3</DOCUMENT_ID>
<NAME>Vessel Repair Program (VPR)</NAME>
<TYPE>Progress feedback</TYPE>
</FEEDBACK>
<!ELEMENT steering commite (NAME)>
<!ELEMENT NAME (#PCDATA)>
<STEERING_COMMITE>
<NAME>Official Steering Commité</NAME>
</STEERING_COMMITE>
<!ELEMENT annual_document (NAME, DELIVERY, STATUS, DATE)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT DATE(#PCDATA)>
<ANNUAL_DOCUMENT>
<NAME>Vessel Repair Program (VPR)</NAME>
<DELIVERY>31-12-2022</DELIVERY>
<STATUS>On schedule, 27% done</STATUS>
<DATE>23-11-2020</DATE>
</ANNUAL_DOCUMENT>
]>
It is a single big file, but I'm supposed to integrate it to show the
connections.
如果是单个大文件,则只能有一个根元素。您也不能将 DTD 与实际 XML.
混合使用
这就是我要做的...
<?xml version="1.0"?>
<!DOCTYPE bon [
<!ELEMENT bon (PRECONDITION, PROJECT_PROPOSAL, PROJECT_APPLICATION_FORM,
REQUIREMENTS_FORM, EXTERNAL_PARTNER, REPORT, PROJECT_MANAGER_RESEARCH,
FEEDBACK, STEERING_COMMITE, ANNUAL_DOCUMENT)>
<!ELEMENT PRECONDITION (RD_POLICY, CONNECTION_WITH_DSNS, BUDGET, CAPACITEIT)>
<!ELEMENT RD_POLICY (#PCDATA)>
<!ELEMENT CONNECTION_WITH_DSNS (#PCDATA)>
<!ELEMENT BUDGET (#PCDATA)>
<!ELEMENT CAPACITEIT (#PCDATA)>
<!ELEMENT PROJECT_PROPOSAL (DOCUMENT_ID, NAME, COMPANY_NAME, ACTIVITY, DELIVERY, AIM, TYPE)>
<!ELEMENT DOCUMENT_ID (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT COMPANY_NAME (#PCDATA)>
<!ELEMENT ACTIVITY (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT AIM (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>
<!ELEMENT PROJECT_APPLICATION_FORM (GOAL, STAFF, BUDGET, EK_NUMBER, NAME, DATE)>
<!ELEMENT GOAL (#PCDATA)>
<!ELEMENT STAFF (#PCDATA)>
<!ELEMENT EK_NUMBER (#PCDATA)>
<!ELEMENT DATE (#PCDATA)>
<!ELEMENT REQUIREMENTS_FORM (MINIMUM_REQUIREMENTS, FITTING_BUDGET, CAPACITY_REQUIRED)>
<!ELEMENT MINIMUM_REQUIREMENTS (#PCDATA)>
<!ELEMENT FITTING_BUDGET (#PCDATA)>
<!ELEMENT CAPACITY_REQUIRED (#PCDATA)>
<!ELEMENT EXTERNAL_PARTNER (NAME, COMPANY_NAME)>
<!ELEMENT REPORT (NUMBER, DELIVERY, STATUS, NAME)>
<!ELEMENT NUMBER (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT PROJECT_MANAGER_RESEARCH (NAAM, ID)>
<!ELEMENT NAAM (#PCDATA)>
<!ELEMENT ID (#PCDATA)>
<!ELEMENT FEEDBACK (DOCUMENT_ID, NAME, TYPE)>
<!ELEMENT STEERING_COMMITE (NAME)>
<!ELEMENT ANNUAL_DOCUMENT (NAME, DELIVERY, STATUS, DATE)>
]>
<bon>
<PRECONDITION>
<RD_POLICY>Version 4</RD_POLICY>
<CONNECTION_WITH_DSNS>Partner Firm</CONNECTION_WITH_DSNS>
<BUDGET>€200000</BUDGET>
<CAPACITEIT>€2K mede-als 15 medewerkers gedurende 13 weken minimum</CAPACITEIT>
</PRECONDITION>
<PROJECT_PROPOSAL>
<DOCUMENT_ID>3</DOCUMENT_ID>
<NAME>Vessel Restructure Program (VRP)</NAME>
<COMPANY_NAME>Amels</COMPANY_NAME>
<ACTIVITY>Restructuring of the vessel Hoensma</ACTIVITY>
<DELIVERY>31-12-2022</DELIVERY>
<AIM>Restore integrity of hull vessel Hoensma</AIM>
<TYPE>Repair</TYPE>
</PROJECT_PROPOSAL>
<PROJECT_APPLICATION_FORM>
<GOAL>To restructure the hull of the vessel Hoensma</GOAL>
<STAFF>Marco Jansse plus crew</STAFF>
<BUDGET>€500000</BUDGET>
<EK_NUMBER>761396773</EK_NUMBER>
<NAME>Vessel Restructure Program (VRP)</NAME>
<DATE>26-03-2019</DATE>
</PROJECT_APPLICATION_FORM>
<REQUIREMENTS_FORM>
<MINIMUM_REQUIREMENTS>The project has a maximum time of 6 months, if time is insufficient, cancel the project</MINIMUM_REQUIREMENTS>
<FITTING_BUDGET>The budget has been calculated to be within the €35.000 to €55.000 range</FITTING_BUDGET>
<CAPACITY_REQUIRED>The number of workers that are available is 25</CAPACITY_REQUIRED>
</REQUIREMENTS_FORM>
<EXTERNAL_PARTNER>
<NAME>Vessel Restructure Program (VRP)</NAME>
<COMPANY_NAME>Amels</COMPANY_NAME>
</EXTERNAL_PARTNER>
<REPORT>
<NUMBER>4</NUMBER>
<DELIVERY>23-07-2019</DELIVERY>
<STATUS>On schedule, 17% completed</STATUS>
<NAME> Vessel Restructure Program (VRP)</NAME>
</REPORT>
<PROJECT_MANAGER_RESEARCH>
<NAAM>Joep Broekhuijsen</NAAM>
<ID>379168</ID>
</PROJECT_MANAGER_RESEARCH>
<FEEDBACK>
<DOCUMENT_ID>3</DOCUMENT_ID>
<NAME>Vessel Repair Program (VPR)</NAME>
<TYPE>Progress feedback</TYPE>
</FEEDBACK>
<STEERING_COMMITE>
<NAME>Official Steering Commité</NAME>
</STEERING_COMMITE>
<ANNUAL_DOCUMENT>
<NAME>Vessel Repair Program (VPR)</NAME>
<DELIVERY>31-12-2022</DELIVERY>
<STATUS>On schedule, 27% done</STATUS>
<DATE>23-11-2020</DATE>
</ANNUAL_DOCUMENT>
</bon>
希望对您有所帮助。
或者将声明作为注释添加到 XML...
<?xml version="1.0"?>
<!DOCTYPE bon [
<!ELEMENT bon (PRECONDITION, PROJECT_PROPOSAL, PROJECT_APPLICATION_FORM,
REQUIREMENTS_FORM, EXTERNAL_PARTNER, REPORT, PROJECT_MANAGER_RESEARCH,
FEEDBACK, STEERING_COMMITE, ANNUAL_DOCUMENT)>
<!ELEMENT PRECONDITION (RD_POLICY, CONNECTION_WITH_DSNS, BUDGET, CAPACITEIT)>
<!ELEMENT RD_POLICY (#PCDATA)>
<!ELEMENT CONNECTION_WITH_DSNS (#PCDATA)>
<!ELEMENT BUDGET (#PCDATA)>
<!ELEMENT CAPACITEIT (#PCDATA)>
<!ELEMENT PROJECT_PROPOSAL (DOCUMENT_ID, NAME, COMPANY_NAME, ACTIVITY, DELIVERY, AIM, TYPE)>
<!ELEMENT DOCUMENT_ID (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT COMPANY_NAME (#PCDATA)>
<!ELEMENT ACTIVITY (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT AIM (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>
<!ELEMENT PROJECT_APPLICATION_FORM (GOAL, STAFF, BUDGET, EK_NUMBER, NAME, DATE)>
<!ELEMENT GOAL (#PCDATA)>
<!ELEMENT STAFF (#PCDATA)>
<!ELEMENT EK_NUMBER (#PCDATA)>
<!ELEMENT DATE (#PCDATA)>
<!ELEMENT REQUIREMENTS_FORM (MINIMUM_REQUIREMENTS, FITTING_BUDGET, CAPACITY_REQUIRED)>
<!ELEMENT MINIMUM_REQUIREMENTS (#PCDATA)>
<!ELEMENT FITTING_BUDGET (#PCDATA)>
<!ELEMENT CAPACITY_REQUIRED (#PCDATA)>
<!ELEMENT EXTERNAL_PARTNER (NAME, COMPANY_NAME)>
<!ELEMENT REPORT (NUMBER, DELIVERY, STATUS, NAME)>
<!ELEMENT NUMBER (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT PROJECT_MANAGER_RESEARCH (NAAM, ID)>
<!ELEMENT NAAM (#PCDATA)>
<!ELEMENT ID (#PCDATA)>
<!ELEMENT FEEDBACK (DOCUMENT_ID, NAME, TYPE)>
<!ELEMENT STEERING_COMMITE (NAME)>
<!ELEMENT ANNUAL_DOCUMENT (NAME, DELIVERY, STATUS, DATE)>
]>
<bon>
<!--
<!ELEMENT PRECONDITION (RD_POLICY, CONNECTION_WITH_DSNS, BUDGET, CAPACITEIT)>
<!ELEMENT RD_POLICY (#PCDATA)>
<!ELEMENT CONNECTION_WITH_DSNS (#PCDATA)>
<!ELEMENT BUDGET (#PCDATA)>
<!ELEMENT CAPACITEIT (#PCDATA)>-->
<PRECONDITION>
<RD_POLICY>Version 4</RD_POLICY>
<CONNECTION_WITH_DSNS>Partner Firm</CONNECTION_WITH_DSNS>
<BUDGET>€200000</BUDGET>
<CAPACITEIT>€2K mede-als 15 medewerkers gedurende 13 weken minimum</CAPACITEIT>
</PRECONDITION>
<!--
<!ELEMENT PROJECT_PROPOSAL (DOCUMENT_ID, NAME, COMPANY_NAME, ACTIVITY, DELIVERY, AIM, TYPE)>
<!ELEMENT DOCUMENT_ID (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT COMPANY_NAME (#PCDATA)>
<!ELEMENT ACTIVITY (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT AIM (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>-->
<PROJECT_PROPOSAL>
<DOCUMENT_ID>3</DOCUMENT_ID>
<NAME>Vessel Restructure Program (VRP)</NAME>
<COMPANY_NAME>Amels</COMPANY_NAME>
<ACTIVITY>Restructuring of the vessel Hoensma</ACTIVITY>
<DELIVERY>31-12-2022</DELIVERY>
<AIM>Restore integrity of hull vessel Hoensma</AIM>
<TYPE>Repair</TYPE>
</PROJECT_PROPOSAL>
<!--
<!ELEMENT PROJECT_APPLICATION_FORM (GOAL, STAFF, BUDGET, EK_NUMBER, NAME, DATE)>
<!ELEMENT GOAL (#PCDATA)>
<!ELEMENT STAFF (#PCDATA)>
<!ELEMENT BUDGET (#PCDATA)>
<!ELEMENT EK_NUMBER (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT DATE (#PCDATA)>-->
<PROJECT_APPLICATION_FORM>
<GOAL>To restructure the hull of the vessel Hoensma</GOAL>
<STAFF>Marco Jansse plus crew</STAFF>
<BUDGET>€500000</BUDGET>
<EK_NUMBER>761396773</EK_NUMBER>
<NAME>Vessel Restructure Program (VRP)</NAME>
<DATE>26-03-2019</DATE>
</PROJECT_APPLICATION_FORM>
<!--
<!ELEMENT REQUIREMENTS_FORM (MINIMUM_REQUIREMENTS, FITTING_BUDGET, CAPACITY_REQUIRED)>
<!ELEMENT MINIMUM_REQUIREMENTS (#PCDATA)>
<!ELEMENT FITTING_BUDGET (#PCDATA)>
<!ELEMENT CAPACITY_REQUIRED (#PCDATA)>-->
<REQUIREMENTS_FORM>
<MINIMUM_REQUIREMENTS>The project has a maximum time of 6 months, if time is insufficient, cancel the project</MINIMUM_REQUIREMENTS>
<FITTING_BUDGET>The budget has been calculated to be within the €35.000 to €55.000 range</FITTING_BUDGET>
<CAPACITY_REQUIRED>The number of workers that are available is 25</CAPACITY_REQUIRED>
</REQUIREMENTS_FORM>
<!--
<!ELEMENT EXTERNAL_PARTNER (NAME, COMPANY_NAME)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT COMPANY_NAME (#PCDATA)>-->
<EXTERNAL_PARTNER>
<NAME>Vessel Restructure Program (VRP)</NAME>
<COMPANY_NAME>Amels</COMPANY_NAME>
</EXTERNAL_PARTNER>
<!--
<!ELEMENT REPORT (NUMBER, DELIVERY, STATUS, NAME)>
<!ELEMENT NUMBER (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>-->
<REPORT>
<NUMBER>4</NUMBER>
<DELIVERY>23-07-2019</DELIVERY>
<STATUS>On schedule, 17% completed</STATUS>
<NAME> Vessel Restructure Program (VRP)</NAME>
</REPORT>
<!--
<!ELEMENT PROJECT_MANAGER_RESEARCH (NAAM, ID)>
<!ELEMENT NAAM (#PCDATA)>
<!ELEMENT ID (#PCDATA)>-->
<PROJECT_MANAGER_RESEARCH>
<NAAM>Joep Broekhuijsen</NAAM>
<ID>379168</ID>
</PROJECT_MANAGER_RESEARCH>
<!--
<!ELEMENT FEEDBACK (DOCUMENT_ID, NAME, TYPE)>
<!ELEMENT DOCUMENT_ID (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>-->
<FEEDBACK>
<DOCUMENT_ID>3</DOCUMENT_ID>
<NAME>Vessel Repair Program (VPR)</NAME>
<TYPE>Progress feedback</TYPE>
</FEEDBACK>
<!--
<!ELEMENT STEERING_COMMITE (NAME)>
<!ELEMENT NAME (#PCDATA)>-->
<STEERING_COMMITE>
<NAME>Official Steering Commité</NAME>
</STEERING_COMMITE>
<!--
<!ELEMENT ANNUAL_DOCUMENT (NAME, DELIVERY, STATUS, DATE)>
<!ELEMENT NAME (#PCDATA)>-\->
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT DATE (#PCDATA)>-->
<ANNUAL_DOCUMENT>
<NAME>Vessel Repair Program (VPR)</NAME>
<DELIVERY>31-12-2022</DELIVERY>
<STATUS>On schedule, 27% done</STATUS>
<DATE>23-11-2020</DATE>
</ANNUAL_DOCUMENT>
</bon>
对于一门学科,我应该同时制作 XML 和 DTD。起初我将实体分开放在不同的文件中,但他们更喜欢我将其整合,以便清楚地显示连接。
这几天我一直在努力理解它是如何工作的,但似乎无法解决。我很难理解我在做什么,无论是对还是错,以及如何显示这些联系。如果我尝试验证工作,它会立即在第三行出错。
<?xml version="1.0"?>
<!DOCTYPE bon>
<!ELEMENT precondition (RD_POLICY, CONNECTION_WITH_DSNS, CAPACITEIT)>
<!ELEMENT RD_POLICY (#PCDATA)>
<!ELEMENT CONNECTION_WITH_DSNS (#PCDATA)>
<!ELEMENT BUDGET (#PCDATA)>
<!ELEMENT CAPACITEIT (#PCDATA)>
<PRECONDITION>
<RD_POLICY>Version 4</RD_POLICY>
<CONNECTION_WITH_DSNS>Partner Firm</CONNECTION_WITH_DSNS>
<BUDGET>€200000</BUDGET>
<CAPACITEIT>€2K mede-als 15 medewerkers gedurende 13 weken minimum</CAPACITEIT>
</PRECONDITION>
<!ELEMENT project_proposal (DOCUMENT_ID, NAME, COMPANY_NAME, ACTIVITY, DELIVERY, AIM, TYPE)>
<!ELEMENT DOCUMENT_ID (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT COMPANY_NAME (#PCDATA)>
<!ELEMENT ACTIVITY (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT AIM (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>
<PROJECT_PROPOSAL>
<DOCUMENT_ID>3</DOCUMENT_ID>
<NAME>Vessel Restructure Program (VRP)</NAME>
<COMPANY_NAME>Amels</COMPANY_NAME>
<ACTIVITY>Restructuring of the vessel Hoensma</ACTIITY>
<DELIVERY>31-12-2022</DELIVERY>
<AIM>Restore integrity of hull vessel Hoensma</AIM>
<TYPE>Repair</TYPE>
</PROJECT_PROPOSAL>
<!ELEMENT project_application_form (GOAL, STAFF, BUDGET, EK_NUMBER, NAME, DATA)>
<!ELEMENT GOAL (#PCDATA)>
<!ELEMENT STAFF (#PCDATA)>
<!ELEMENT BUDGET (#PCDATA)>
<!ELEMENT EK_NUMBER (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMT DATA (#PCDATA)>
<PROJECT_APPLICATION_FORM>
<GOAL>To restructure the hull of the vessel Hoensma</GOAL>
<STAFF>Marco Jansse plus crew</STAFF>
<BUDGET>€500000</BUDGET>
<EK_NUMBER>761396773</EK_NUMBER>
<NAME>Vessel Restructure Program (VRP)</NAME>
<DATE>26-03-2019</DATE>
</PROJECT_APPLICATION_FORM>
<!ELEMENT requirements_form(MINIMUM_REQUIREMENTS, FITTING_BUDGET, CAPACITY_REQUIRED)>
<!ELEMENT MINIMUM_REQUIREMENTS (#PCDATA)>
<!ELEMENT FITTING_BUDGET (#PCDATA)>
<!ELEMENT CAPACITY_REQUIRED (#PCDATA)>
]>
<REQUIREMENTS_FORM>
<MINIMUM_REQUIREMENTS>The project has a maximum time of 6 months, if time is insufficient, cancel the project</MINIMUM_REQUIREMENTS>
<FITTING_BUDGET>The budget has been calculated to be within the €35.000 to €55.000 range</FITTING_BUDGET>
<CAPACITY_REQUIRED>The number of workers that are available is 25</CAPACITY_REQUIRED>
</REQUIREMENTS_FORM>
<!ELEMENT external_partner (NAME, COMPANY)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT COMPANY (#PCDATA)>
<EXTERNAL_PARTNER>
<NAME>Vessel Restructure Program (VRP)</NAME>
<COMPANY_NAME>Amels</COMPANY_NAME>
</EXTERNAL_PARTNER>
<!ELEMENT report (NUMBER, DELIVERY, STATUS, NAME)>
<!ELEMENT NUMBER (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<REPORT>
<NUMBER>4</NUMBER>
<DELIVERY>23-07-2019</DELIVERY>
<STATUS>On schedule, 17% completed</STATUS>
<NAME> Vessel Restructure Program (VRP)</NAME>
</REPORT>
<!ELEMENT project_manager_research (NAAM, ID)>
<!ELEMENT NAAM (#PCDATA)>
<!ELEMENT ID (#PCDATA)>
<PROJECT_MANAGER_RESEARCH>
<NAAM>Joep Broekhuijsen</NAAM>
<ID>379168</ID>
</PROJECT_MANAGER_RESEARCH>
<!ELEMENT feedback (DOCUMENT_ID, NAME, TYPE)>
<!ELEMENT DOCUMENT_ID (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>
<FEEDBACK>
<DOCUMENT_ID>3</DOCUMENT_ID>
<NAME>Vessel Repair Program (VPR)</NAME>
<TYPE>Progress feedback</TYPE>
</FEEDBACK>
<!ELEMENT steering commite (NAME)>
<!ELEMENT NAME (#PCDATA)>
<STEERING_COMMITE>
<NAME>Official Steering Commité</NAME>
</STEERING_COMMITE>
<!ELEMENT annual_document (NAME, DELIVERY, STATUS, DATE)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT DATE(#PCDATA)>
<ANNUAL_DOCUMENT>
<NAME>Vessel Repair Program (VPR)</NAME>
<DELIVERY>31-12-2022</DELIVERY>
<STATUS>On schedule, 27% done</STATUS>
<DATE>23-11-2020</DATE>
</ANNUAL_DOCUMENT>
]>
It is a single big file, but I'm supposed to integrate it to show the connections.
如果是单个大文件,则只能有一个根元素。您也不能将 DTD 与实际 XML.
混合使用这就是我要做的...
<?xml version="1.0"?>
<!DOCTYPE bon [
<!ELEMENT bon (PRECONDITION, PROJECT_PROPOSAL, PROJECT_APPLICATION_FORM,
REQUIREMENTS_FORM, EXTERNAL_PARTNER, REPORT, PROJECT_MANAGER_RESEARCH,
FEEDBACK, STEERING_COMMITE, ANNUAL_DOCUMENT)>
<!ELEMENT PRECONDITION (RD_POLICY, CONNECTION_WITH_DSNS, BUDGET, CAPACITEIT)>
<!ELEMENT RD_POLICY (#PCDATA)>
<!ELEMENT CONNECTION_WITH_DSNS (#PCDATA)>
<!ELEMENT BUDGET (#PCDATA)>
<!ELEMENT CAPACITEIT (#PCDATA)>
<!ELEMENT PROJECT_PROPOSAL (DOCUMENT_ID, NAME, COMPANY_NAME, ACTIVITY, DELIVERY, AIM, TYPE)>
<!ELEMENT DOCUMENT_ID (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT COMPANY_NAME (#PCDATA)>
<!ELEMENT ACTIVITY (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT AIM (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>
<!ELEMENT PROJECT_APPLICATION_FORM (GOAL, STAFF, BUDGET, EK_NUMBER, NAME, DATE)>
<!ELEMENT GOAL (#PCDATA)>
<!ELEMENT STAFF (#PCDATA)>
<!ELEMENT EK_NUMBER (#PCDATA)>
<!ELEMENT DATE (#PCDATA)>
<!ELEMENT REQUIREMENTS_FORM (MINIMUM_REQUIREMENTS, FITTING_BUDGET, CAPACITY_REQUIRED)>
<!ELEMENT MINIMUM_REQUIREMENTS (#PCDATA)>
<!ELEMENT FITTING_BUDGET (#PCDATA)>
<!ELEMENT CAPACITY_REQUIRED (#PCDATA)>
<!ELEMENT EXTERNAL_PARTNER (NAME, COMPANY_NAME)>
<!ELEMENT REPORT (NUMBER, DELIVERY, STATUS, NAME)>
<!ELEMENT NUMBER (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT PROJECT_MANAGER_RESEARCH (NAAM, ID)>
<!ELEMENT NAAM (#PCDATA)>
<!ELEMENT ID (#PCDATA)>
<!ELEMENT FEEDBACK (DOCUMENT_ID, NAME, TYPE)>
<!ELEMENT STEERING_COMMITE (NAME)>
<!ELEMENT ANNUAL_DOCUMENT (NAME, DELIVERY, STATUS, DATE)>
]>
<bon>
<PRECONDITION>
<RD_POLICY>Version 4</RD_POLICY>
<CONNECTION_WITH_DSNS>Partner Firm</CONNECTION_WITH_DSNS>
<BUDGET>€200000</BUDGET>
<CAPACITEIT>€2K mede-als 15 medewerkers gedurende 13 weken minimum</CAPACITEIT>
</PRECONDITION>
<PROJECT_PROPOSAL>
<DOCUMENT_ID>3</DOCUMENT_ID>
<NAME>Vessel Restructure Program (VRP)</NAME>
<COMPANY_NAME>Amels</COMPANY_NAME>
<ACTIVITY>Restructuring of the vessel Hoensma</ACTIVITY>
<DELIVERY>31-12-2022</DELIVERY>
<AIM>Restore integrity of hull vessel Hoensma</AIM>
<TYPE>Repair</TYPE>
</PROJECT_PROPOSAL>
<PROJECT_APPLICATION_FORM>
<GOAL>To restructure the hull of the vessel Hoensma</GOAL>
<STAFF>Marco Jansse plus crew</STAFF>
<BUDGET>€500000</BUDGET>
<EK_NUMBER>761396773</EK_NUMBER>
<NAME>Vessel Restructure Program (VRP)</NAME>
<DATE>26-03-2019</DATE>
</PROJECT_APPLICATION_FORM>
<REQUIREMENTS_FORM>
<MINIMUM_REQUIREMENTS>The project has a maximum time of 6 months, if time is insufficient, cancel the project</MINIMUM_REQUIREMENTS>
<FITTING_BUDGET>The budget has been calculated to be within the €35.000 to €55.000 range</FITTING_BUDGET>
<CAPACITY_REQUIRED>The number of workers that are available is 25</CAPACITY_REQUIRED>
</REQUIREMENTS_FORM>
<EXTERNAL_PARTNER>
<NAME>Vessel Restructure Program (VRP)</NAME>
<COMPANY_NAME>Amels</COMPANY_NAME>
</EXTERNAL_PARTNER>
<REPORT>
<NUMBER>4</NUMBER>
<DELIVERY>23-07-2019</DELIVERY>
<STATUS>On schedule, 17% completed</STATUS>
<NAME> Vessel Restructure Program (VRP)</NAME>
</REPORT>
<PROJECT_MANAGER_RESEARCH>
<NAAM>Joep Broekhuijsen</NAAM>
<ID>379168</ID>
</PROJECT_MANAGER_RESEARCH>
<FEEDBACK>
<DOCUMENT_ID>3</DOCUMENT_ID>
<NAME>Vessel Repair Program (VPR)</NAME>
<TYPE>Progress feedback</TYPE>
</FEEDBACK>
<STEERING_COMMITE>
<NAME>Official Steering Commité</NAME>
</STEERING_COMMITE>
<ANNUAL_DOCUMENT>
<NAME>Vessel Repair Program (VPR)</NAME>
<DELIVERY>31-12-2022</DELIVERY>
<STATUS>On schedule, 27% done</STATUS>
<DATE>23-11-2020</DATE>
</ANNUAL_DOCUMENT>
</bon>
希望对您有所帮助。
或者将声明作为注释添加到 XML...
<?xml version="1.0"?>
<!DOCTYPE bon [
<!ELEMENT bon (PRECONDITION, PROJECT_PROPOSAL, PROJECT_APPLICATION_FORM,
REQUIREMENTS_FORM, EXTERNAL_PARTNER, REPORT, PROJECT_MANAGER_RESEARCH,
FEEDBACK, STEERING_COMMITE, ANNUAL_DOCUMENT)>
<!ELEMENT PRECONDITION (RD_POLICY, CONNECTION_WITH_DSNS, BUDGET, CAPACITEIT)>
<!ELEMENT RD_POLICY (#PCDATA)>
<!ELEMENT CONNECTION_WITH_DSNS (#PCDATA)>
<!ELEMENT BUDGET (#PCDATA)>
<!ELEMENT CAPACITEIT (#PCDATA)>
<!ELEMENT PROJECT_PROPOSAL (DOCUMENT_ID, NAME, COMPANY_NAME, ACTIVITY, DELIVERY, AIM, TYPE)>
<!ELEMENT DOCUMENT_ID (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT COMPANY_NAME (#PCDATA)>
<!ELEMENT ACTIVITY (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT AIM (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>
<!ELEMENT PROJECT_APPLICATION_FORM (GOAL, STAFF, BUDGET, EK_NUMBER, NAME, DATE)>
<!ELEMENT GOAL (#PCDATA)>
<!ELEMENT STAFF (#PCDATA)>
<!ELEMENT EK_NUMBER (#PCDATA)>
<!ELEMENT DATE (#PCDATA)>
<!ELEMENT REQUIREMENTS_FORM (MINIMUM_REQUIREMENTS, FITTING_BUDGET, CAPACITY_REQUIRED)>
<!ELEMENT MINIMUM_REQUIREMENTS (#PCDATA)>
<!ELEMENT FITTING_BUDGET (#PCDATA)>
<!ELEMENT CAPACITY_REQUIRED (#PCDATA)>
<!ELEMENT EXTERNAL_PARTNER (NAME, COMPANY_NAME)>
<!ELEMENT REPORT (NUMBER, DELIVERY, STATUS, NAME)>
<!ELEMENT NUMBER (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT PROJECT_MANAGER_RESEARCH (NAAM, ID)>
<!ELEMENT NAAM (#PCDATA)>
<!ELEMENT ID (#PCDATA)>
<!ELEMENT FEEDBACK (DOCUMENT_ID, NAME, TYPE)>
<!ELEMENT STEERING_COMMITE (NAME)>
<!ELEMENT ANNUAL_DOCUMENT (NAME, DELIVERY, STATUS, DATE)>
]>
<bon>
<!--
<!ELEMENT PRECONDITION (RD_POLICY, CONNECTION_WITH_DSNS, BUDGET, CAPACITEIT)>
<!ELEMENT RD_POLICY (#PCDATA)>
<!ELEMENT CONNECTION_WITH_DSNS (#PCDATA)>
<!ELEMENT BUDGET (#PCDATA)>
<!ELEMENT CAPACITEIT (#PCDATA)>-->
<PRECONDITION>
<RD_POLICY>Version 4</RD_POLICY>
<CONNECTION_WITH_DSNS>Partner Firm</CONNECTION_WITH_DSNS>
<BUDGET>€200000</BUDGET>
<CAPACITEIT>€2K mede-als 15 medewerkers gedurende 13 weken minimum</CAPACITEIT>
</PRECONDITION>
<!--
<!ELEMENT PROJECT_PROPOSAL (DOCUMENT_ID, NAME, COMPANY_NAME, ACTIVITY, DELIVERY, AIM, TYPE)>
<!ELEMENT DOCUMENT_ID (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT COMPANY_NAME (#PCDATA)>
<!ELEMENT ACTIVITY (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT AIM (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>-->
<PROJECT_PROPOSAL>
<DOCUMENT_ID>3</DOCUMENT_ID>
<NAME>Vessel Restructure Program (VRP)</NAME>
<COMPANY_NAME>Amels</COMPANY_NAME>
<ACTIVITY>Restructuring of the vessel Hoensma</ACTIVITY>
<DELIVERY>31-12-2022</DELIVERY>
<AIM>Restore integrity of hull vessel Hoensma</AIM>
<TYPE>Repair</TYPE>
</PROJECT_PROPOSAL>
<!--
<!ELEMENT PROJECT_APPLICATION_FORM (GOAL, STAFF, BUDGET, EK_NUMBER, NAME, DATE)>
<!ELEMENT GOAL (#PCDATA)>
<!ELEMENT STAFF (#PCDATA)>
<!ELEMENT BUDGET (#PCDATA)>
<!ELEMENT EK_NUMBER (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT DATE (#PCDATA)>-->
<PROJECT_APPLICATION_FORM>
<GOAL>To restructure the hull of the vessel Hoensma</GOAL>
<STAFF>Marco Jansse plus crew</STAFF>
<BUDGET>€500000</BUDGET>
<EK_NUMBER>761396773</EK_NUMBER>
<NAME>Vessel Restructure Program (VRP)</NAME>
<DATE>26-03-2019</DATE>
</PROJECT_APPLICATION_FORM>
<!--
<!ELEMENT REQUIREMENTS_FORM (MINIMUM_REQUIREMENTS, FITTING_BUDGET, CAPACITY_REQUIRED)>
<!ELEMENT MINIMUM_REQUIREMENTS (#PCDATA)>
<!ELEMENT FITTING_BUDGET (#PCDATA)>
<!ELEMENT CAPACITY_REQUIRED (#PCDATA)>-->
<REQUIREMENTS_FORM>
<MINIMUM_REQUIREMENTS>The project has a maximum time of 6 months, if time is insufficient, cancel the project</MINIMUM_REQUIREMENTS>
<FITTING_BUDGET>The budget has been calculated to be within the €35.000 to €55.000 range</FITTING_BUDGET>
<CAPACITY_REQUIRED>The number of workers that are available is 25</CAPACITY_REQUIRED>
</REQUIREMENTS_FORM>
<!--
<!ELEMENT EXTERNAL_PARTNER (NAME, COMPANY_NAME)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT COMPANY_NAME (#PCDATA)>-->
<EXTERNAL_PARTNER>
<NAME>Vessel Restructure Program (VRP)</NAME>
<COMPANY_NAME>Amels</COMPANY_NAME>
</EXTERNAL_PARTNER>
<!--
<!ELEMENT REPORT (NUMBER, DELIVERY, STATUS, NAME)>
<!ELEMENT NUMBER (#PCDATA)>
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>-->
<REPORT>
<NUMBER>4</NUMBER>
<DELIVERY>23-07-2019</DELIVERY>
<STATUS>On schedule, 17% completed</STATUS>
<NAME> Vessel Restructure Program (VRP)</NAME>
</REPORT>
<!--
<!ELEMENT PROJECT_MANAGER_RESEARCH (NAAM, ID)>
<!ELEMENT NAAM (#PCDATA)>
<!ELEMENT ID (#PCDATA)>-->
<PROJECT_MANAGER_RESEARCH>
<NAAM>Joep Broekhuijsen</NAAM>
<ID>379168</ID>
</PROJECT_MANAGER_RESEARCH>
<!--
<!ELEMENT FEEDBACK (DOCUMENT_ID, NAME, TYPE)>
<!ELEMENT DOCUMENT_ID (#PCDATA)>
<!ELEMENT NAME (#PCDATA)>
<!ELEMENT TYPE (#PCDATA)>-->
<FEEDBACK>
<DOCUMENT_ID>3</DOCUMENT_ID>
<NAME>Vessel Repair Program (VPR)</NAME>
<TYPE>Progress feedback</TYPE>
</FEEDBACK>
<!--
<!ELEMENT STEERING_COMMITE (NAME)>
<!ELEMENT NAME (#PCDATA)>-->
<STEERING_COMMITE>
<NAME>Official Steering Commité</NAME>
</STEERING_COMMITE>
<!--
<!ELEMENT ANNUAL_DOCUMENT (NAME, DELIVERY, STATUS, DATE)>
<!ELEMENT NAME (#PCDATA)>-\->
<!ELEMENT DELIVERY (#PCDATA)>
<!ELEMENT STATUS (#PCDATA)>
<!ELEMENT DATE (#PCDATA)>-->
<ANNUAL_DOCUMENT>
<NAME>Vessel Repair Program (VPR)</NAME>
<DELIVERY>31-12-2022</DELIVERY>
<STATUS>On schedule, 27% done</STATUS>
<DATE>23-11-2020</DATE>
</ANNUAL_DOCUMENT>
</bon>