Hi Folks, Posts from Michael Kay are learning events for me.
A
QName is a namespace-qualified name. Here is XML containing two QNames: <ac:aircraft
xmlns:ac="http://www.aircraft.org"> The two
abbreviated QNames are: XML parsers know the rules for converting short names (abbreviated names) to long names (expanded names): The
abbreviated form of the names are statically – at parse time – resolvable to the long names. QNames may also be used in data. In the following XML, the value of the <log> element is a QName: <network-traffic
xmlns:network="http://www.network-traffic.org"> XML parsers operate only on markup, not data. So, an XML parser does not convert the short name to the long name: Notice that the parser did not convert the QName
network:client-error to an expanded name. The mapping from short name to long name must be done by a higher level application such as an XSLT processor or an XML Schema validator. In other words, the resolution of short name to long name must be done
dynamically, not statically. Question: Why is it better to
statically resolve short names to long names? What are the disadvantages of
dynamically resolving short names to long names? Can you provide a concrete example of where problems arise as a result of having to
dynamically resolve short names to long names? |