プロジェクトの XML スキーマを書いています。次の問題を解決できません。
要素を単独でネストすることはできません。例:
<document>
<text>
<b>
<i>
<a link="http://wikipedia.org">
<b />
</a>
</i>
</b>
</text>
</document>
b 自体がネストされているため、この例は許可されません。だから私の質問は次のとおりです。
有利にthx!
\モルテン・モラー
編集:これまで、要素がそれ自体の子になることができることだけを確認しましたが、要素がそれ自体である子孫を持つことができないことは確認していません。
<?xml version="1.0"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:xs="http://cs.au.dk/dWebTek/WikiXML"
targetNamespace="http://cs.au.dk/dWebTek/WikiXML"
elementFormDefault="qualified">
<element name="wiki">
<complexType>
<choice maxOccurs="unbounded">
<!-- A lot of other element is listed here -->
<element name="bold" type="xs:boldnest"/> <!-- Missing nest function -->
</choice>
<complexType>
</element>
<complexType name="boldnest">
<choice maxOccurs="unbounded">
<element name="bold" minOccurs="0" maxOccurs="0" type="xs:boldnest"/>
<!-- All the other element is copy pasted in here -->
</choice>
</complexType>