Hi Folks, An XSLT function is XML. XSLT functions are expressed this way: <xsl:function name="f:my-function"> <!-- do something --> </xsl:function> It has an element, function, which is bound to the XSLT namespace. It has an attribute, name. The purpose of the name attribute is to name the function (i.e., name a chunk of markup). Why did they (the XSLT working group) design the XML that way? Specifically, why did they use an attribute for providing the name of the function? Why didn’t they use an element: <xsl:function> <!-- do something --> </xsl:function> An XML Schema element declaration is XML. Element declarations are expressed this way: <xs:element name="Book"> <!-- declare it --> </xs:element> Why did they (the XML Schema working group) design the XML that way? Specifically, why did they use an attribute for providing the name of the element? Why didn’t they use an element: <xs:element> <!-- declare it --> </xs:element> An XML RDF document is XML. RDF items are expressed this way: <River rdf:ID="Yangtze"> <!-- describe something --> </River> Why did they (the RDF working group) design the XML that way? Specifically, why did they use an attribute for providing the identity of the item? Why didn’t they use an element: <River> <!-- describe something --> </River> In each case the XML was designed using an attribute rather than an element. Why? Which of these is the reason:
/Roger |