Can use prefixed names instead if you prefer
Usual namespace prefix binding attributes
Convenient in rare cases when namespaces shift from one element to the next (two widely intermixed vocabularies like XSLT)
<?xml version="1.0"?>
<element xmlns="http://relaxng.org/ns/structure/1.0"
name="sng:SONG"
xmlns:sng="http://www.cafeconleche.org/namespace/song">
<element name="sng:TITLE">
<text/>
</element>
<element name="sng:PHOTO">
<attribute name="ALT">
<text/>
</attribute>
<attribute name="WIDTH">
<text/>
</attribute>
<attribute name="HEIGHT">
<text/>
</attribute>
</element>
<oneOrMore>
<element name="sng:COMPOSER">
<text/>
</element>
</oneOrMore>
<zeroOrMore>
<element name="sng:PRODUCER">
<text/>
</element>
</zeroOrMore>
<optional>
<element name="sng:PUBLISHER">
<text/>
</element>
</optional>
<optional>
<element name="sng:LENGTH">
<text/>
</element>
</optional>
<optional>
<element name="sng:YEAR">
<text/>
</element>
</optional>
<oneOrMore>
<element name="sng:ARTIST">
<text/>
</element>
</oneOrMore>
</element>
namespace sng = "http://www.cafeconleche.org/namespace/song"
element sng:SONG {
element sng:TITLE { text },
element sng:PHOTO {
attribute ALT { text },
attribute WIDTH { text },
attribute HEIGHT { text }
},
element sng:COMPOSER { text }+,
element sng:PRODUCER { text }*,
element sng:PUBLISHER { text }?,
element sng:LENGTH { text }?,
element sng:YEAR { text }?,
element sng:ARTIST { text }+
}