Examples of usage

Some of the other important XML-related standards described later utilize the Namespaces standard.

XLink

The latest draft of the XLink standard (see Chapter 27) uses namespaces to embed linking attributes in arbitrary elements. This standard relies upon the use of namespaces:

<document xmlns:xlink="http://www.w3.org/1999/xlink">
  ...
  ... <reference xlink:href="otherDoc.xml" />Other
  Document</reference> ...
  ...
</document>

XSLT

The XSLT standard (see Chapter 17) allows the use of namespaces to embed output elements in an XSLT stylesheet document. Most stylesheet developers tend to use the default namespace either for XSLT element or for output elements:

<xslt:stylesheet
        xmlns:xslt="http://www.w3.org/1999/XSL/Transform">
  ...
  <H1>Normal HTML Header One</H1>
  <xslt:if test="...">
    <P>Normal HTML paragraph.</P>
  </xslt:if>
  ...
</xslt:stylesheet>

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.187.233