attribute
element can have an ns
attribute to specify the namespace
attribute
element does not inherit ns
attribute
<?xml version="1.0"?>
<element xmlns="http://relaxng.org/ns/structure/1.0"
name="SONG"
ns="http://www.cafeconleche.org/namespace/song">
<element name="TITLE">
<text/>
</element>
<element name="PHOTO">
<attribute name="ALT">
<text/>
</attribute>
<attribute name="WIDTH">
<text/>
</attribute>
<attribute name="HEIGHT">
<text/>
</attribute>
<attribute name="type" ns="http://www.w3.org/1999/xlink">
<text/>
</attribute>
<attribute name="href" ns="http://www.w3.org/1999/xlink">
<text/>
</attribute>
<attribute name="actuate" ns="http://www.w3.org/1999/xlink">
<text/>
</attribute>
<attribute name="show" ns="http://www.w3.org/1999/xlink">
<text/>
</attribute>
</element>
<oneOrMore>
<element name="COMPOSER">
<text/>
</element>
</oneOrMore>
<zeroOrMore>
<element name="PRODUCER">
<text/>
</element>
</zeroOrMore>
<optional>
<element name="PUBLISHER">
<text/>
</element>
</optional>
<optional>
<element name="LENGTH">
<text/>
</element>
</optional>
<optional>
<element name="YEAR">
<text/>
</element>
</optional>
<oneOrMore>
<element name="ARTIST">
<text/>
</element>
</oneOrMore>
</element>
default namespace = "http://www.cafeconleche.org/namespace/song"
namespace ns1 = "http://www.w3.org/1999/xlink"
element SONG {
element TITLE { text },
element PHOTO {
attribute ALT { text },
attribute WIDTH { text },
attribute HEIGHT { text },
attribute ns1:type { text },
attribute ns1:href { text },
attribute ns1:actuate { text },
attribute ns1:show { text }
},
element COMPOSER { text }+,
element PRODUCER { text }*,
element PUBLISHER { text }?,
element LENGTH { text }?,
element YEAR { text }?,
element ARTIST { text }+
}