Difference between revisions of "XML Attribute"
no edit summary
imported>JRoush m |
imported>JRoush |
||
Line 2: | Line 2: | ||
XML traits are named attributes of XML elements. The XML syntax doesn't specify what traits are possible, only that they be given as ''TraitName="TraiValue"'' in the opening tag of an element. Oblivion XML recognizes only three true XML traits: '''name''', '''src''', and '''trait'''. | XML traits are named attributes of XML elements. The XML syntax doesn't specify what traits are possible, only that they be given as ''TraitName="TraiValue"'' in the opening tag of an element. Oblivion XML recognizes only three true XML traits: '''name''', '''src''', and '''trait'''. | ||
The '''name''' trait provides a way to identify elements in a menu file. This trait is used only for [[ | The '''name''' trait provides a way to identify elements in a menu file. This trait is used only for [[Object Element]]s - property or operator elements are never named. The name of an element need not be unique within the entire menu, but every element should at least have a different name from it's siblings (as discussed below). | ||
<!-- the 'name' trait of this element has the value "PictureFrame" --> | <!-- the 'name' trait of this element has the value "PictureFrame" --> | ||
Line 19: | Line 19: | ||
The '''src''' trait can refer to any ''menu'' element by it's name, or can use one of the "relative" sources: | The '''src''' trait can refer to any ''menu'' element by it's name, or can use one of the "relative" sources: | ||
*'''Me()''' - refers to the | *'''Me()''' - refers to the object element whose property the operator element is modifying. | ||
*'''Parent()''' - refers to the parent of Me(), the | *'''Parent()''' - refers to the parent of Me(), the object element of which Me() is a child. | ||
*'''Sibling(''SiblingName'')''' - refers to one of the siblings of Me() - that is, the | *'''Sibling(''SiblingName'')''' - refers to one of the siblings of Me() - that is, the object elements that are also children of Parent(). The name of the sibling must be provided as an argument - this is why no two siblings should have the same name trait. | ||
*'''Child(''ChildName'')''' - refers to one of the | *'''Child(''ChildName'')''' - refers to one of the object elements that are children of Me(). Again, the name must be specified. | ||
The '''trait''' trait can refer to any ''property'' of the source element. The current value of this property is used as the "contents", or second operand, of the operator. | The '''trait''' trait can refer to any ''property'' of the source element. The current value of this property is used as the "contents", or second operand, of the operator. | ||
[[Category:Oblivion XML]] | [[Category:Oblivion XML]] |