我有這樣的DTD:DTD到XML模式
<!DOCTYPE recipes [ <!ELEMENT recipes (Recipe+)> <!ELEMENT Recipe (Title,(Ingredients*|Preparation?),Comments?, Nutrition,Fat,Carbohydrates,Protein)> <!ELEMENT Title (#PCDATA)> <!ELEMENT Ingredients EMPTY> <!ATTLIST Ingredients name CDATA #REQUIRED amount CDATA #IMPLIED unit CDATA #IMPLIED> <!ELEMENT Preparation(steps,filling?,dough?,sauce?)> <!ELEMENT steps (#PCDATA)> <!ELEMENT filling (#PCDATA)> <!ELEMENT dough (#PCDATA)> <!ELEMENT sauce (#PCDATA)> <!ELEMENT Comments (#PCDATA)> <!ATTLIST Nutrition Calories CDATA #REQUIRED> <!ELEMENT Fat EMPTY> <!ATTLIST Fat fat CDATA #IMPLIED> <!ELEMENT Carbohydrates EMPTY> <!ATTLIST Carbohydrates carb CDATA #IMPLIED> <!ELEMENT Protein EMPTY> <!ATTLIST Protein prot CDATA #IMPLIED>
]>
我想將其轉換爲XSD,但我不明白我怎麼所有元素創建屬性,以及如何將整個DTD到XSD?提前致謝。