This release uses xml:id and XLink, including some support for extended links, and fixes a couple of bugs. I thought it made sense to get another release out before XML 2004.
This is the sixth release of DocBook NG.
With XML 2004 coming up, I thought I’d get another release out so the DocBook crowd has something to argue about in the bar.
To that end, I’m sure what we need is a little controversy, so I’ve switched to using XLink. And to make it a more interesting, I’ve added an extended link element. This, for example, is one of my test cases:
<article xmlns="http://docbook.org/docbook-ng"
xmlns:xl="http://www.w3.org/1999/xlink"
version="frangelico">
<info>
<title>XLink Test</title>
<extendedlink>
<locator xl:label="person" xl:href="#xperson"/>
<locator xl:label="website" xl:href="http://www.example.com/"/>
<locator xl:label="otherwebsite" xl:href="http://www.example.org/"/>
<arc xl:from="person" xl:to="website" xl:title="To Website"/>
<arc xl:from="person" xl:to="otherwebsite" xl:title="To Other Website"/>
</extendedlink>
</info>
<para xml:id='p4'>This is an
<phrase xl:href="http://www.example.com/">inline link</phrase>.
</para>
<para xml:id='p5'>This is an <phrase xml:id="xperson">out-of-line link</phrase>.
</para>
</article>
I have a not-yet-published stylesheet that does “the right thing”. Sort of.
Here’s a summary of all the user-visible changes in the “Frangelico” release:
<plug role='shameless'>And if all this DocBook stuff is just too confusing, there’s probably still time to sign up for my tutorial. </plug>
Comments:
I was big fan of XLink in past, but now I don't like it much because it depends on #FIXED attributes in DTD which is now considered bad thing and it is not supported in Relax NG for example. If I correctly understand XLink specification each simple link must have attribute xlink:type="simple" present on a corresponding linking element. But in RNG you can't specify this default value in schema so you should write
instead of This seems to me as too verbose and hard to sell given the lack of generic XLink tools on market. If the xl:type="simple" is really neccessary I would prefer other way of linking then XLink -- the old one or invent something as generic as XLink but more useable. I think that something as HLink (http://www.w3.org/TR/hlink/) link types definition specified in an external file and attached by some global attribute (similar to xsi:schemaLocation, but now for links) could work. Integrating something like HLink into XLink should remove most drawbacks of XLink IMHO.The content model of attribution is "(db._text | db.personname)", but I would rather have it "(db._text | db.personname)*", so it can contain both a personname and some other text, such as:
<attribution><personname>Rasmus Kaj</personname>, in a comment on this blog</attribution>
It there a reason for only accepting either but not both? Or is it just a + sign missing on line 1005 of pool.rnc?
Taking a peek at how attribution is defined in the DTD, I think the + sign is missing. Fixed (locally).
Thank you! I hope I didn't cut of any XLink comments, as I would be much interested to see what comes out of that ... One thing that I would like to see, and that I don't think XLink provides, is the ability to use "link shortcuts". Example:
I spend my time at a university, and thus sometimes I have reason to link to course info. But a link into the course catalog is a 100-character string that I can't keep in my head. But all courses has a unique id of six characters, e.g. FG4711. So I put
href="course:FG4711"in my documents and have my xslt sort it out. A more standardized way to manage that would be nice.