>> English << | česky ZVON > Tutorials > XML Base Tutorial
>> Example 3 << | Prev | Next | Contents

xml:base attribute on element - another example


The xml:base attribute can specify an arbitrary base URI. The documents f1.xml and f2.xml both reference the same file.


File f1.xml

      <reference xlink:href = "http://www.zvon.org/a.xml" xlink:type = "simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
Link xlink:href : http://www.zvon.org/a.xml


File f2.xml

     1 <reference xml:base = "http://www.zvon.org/" xlink:href = "a.xml"
          xlink:type = "simple" xmlns:xlink="http://www.w3.org/1999/xlink" />
1Base URI of element reference : http://www.zvon.org/
Link xlink:href : http://www.zvon.org/a.xml