Freelance software grandad
software created
extended or repaired
Follow me on Mastodon
Applications, Libraries, Code
Talks & Presentations
Working on an XMLBaseSupport class. As you might surmise from the name, it's to help when building applications that need to support XML Base.
If you're not familiar with XML Base, give the spec a quick browse. It's both clear and very short, and what it describes is very useful. Here's an extract that catches it in a nutshell
An example of xml:base in a simple document containing XLinks follows. XLink normatively references XML Base for interpretation of relative URI references in xlink:href attributes.<?xml version="1.0"?> <doc xml:base="http://example.org/today/" xmlns:xlink="http://www.w3.org/1999/xlink"> <head> <title>Virtual Library</title> </head> <body> <paragraph>See <link xlink:type="simple" xlink:href="new.xml">what's new</link>!</paragraph> <paragraph>Check out the hot picks of the day!</paragraph> <olist xml:base="/hotpicks/"> <item> <link xlink:type="simple" xlink:href="pick1.xml">Hot Pick #1</link> </item> <item> <link xlink:type="simple" xlink:href="pick2.xml">Hot Pick #2</link> </item> <item> <link xlink:type="simple" xlink:href="pick3.xml">Hot Pick #3</link> </item> </olist> </body> </doc>The URIs in this example resolve to full URIs as follows:
- "what's new" resolves to the URI "http://example.org/today/new.xml"
- "Hot Pick #1" resolves to the URI "http://example.org/hotpicks/pick1.xml"
- "Hot Pick #2" resolves to the URI "http://example.org/hotpicks/pick2.xml"
- "Hot Pick #3" resolves to the URI "http://example.org/hotpicks/pick3.xml"
I've not tested properly yet, but once it's done I'm going to do a filter to implement XInclude. After that, I'll probably go back to the XPath work.
Freelance software grandad
software created
extended or repaired
Follow me on Mastodon
Applications, Libraries, Code
Talks & Presentations