in XHTML output (DocBook XSL 1.71.1) mailing lists">


List Info

Thread: in XHTML output (DocBook XSL 1.71.1)




<link xlink:href="..."> in XHTML output (DocBook XSL 1.71.1)
user name
2006-10-21 03:42:26
Hi,
I don't think you understood my earlier response.  8^)
The existing 1.71.1 stylesheets work with xlink:href in
link, and don't 
care what the prefix is, as long as the xlink namespace uri
is used 
correctly.  But the key to getting that part of the
stylesheet functioning 
is to include the docbook namespace xmlns="http://docbook.or
g/ns/docbook" 
on the document's root element.  That kicks in the DB5 fixup
code to handle 
xlink:href on the link element.

For example, I just processed this DB5 document using two
different xlink 
prefixes:

<?xml version="1.0"?>
<article xmlns=http://docbook.or
g/ns/docbook" 
xmlnsl=&qu
ot;http://www.w3.org/
1999/xlink" 
xmlnslink=
"http://www.w3.org/
1999/xlink"  version="5">
<title>Testing links with 1.71.1</title>
<para>using xl: <link xl:href="http://www.saxonica.co
m/"
      xl:type="simple" 
xl:actuate="onRequest">http://www.saxon
ica.com</link>
</para>
<para>using xlink: <link xlink:href="http://www.saxonica.co
m/"
      xlink:type="simple" 
xlink:actuate="onRequest">http://www.saxon
ica.com</link>
</para>
</article>

Note the default docbook namespace declaration in the
article start tag.  I 
used Saxon 6 with docbook-xsl-1.71.1/xhtml/docbook.xsl and
got this output:

 <p>using xl: <a href="http://www.saxonica.co
m/" 
target="_top">http://www.saxonica
.com</a>
 </p>

<p>using xlink: <a href="http://www.saxonica.co
m/" 
target="_top">http://www.saxonica
.com</a>
</p>

Notice that both prefixes work.

I also tried it with the experimental namespace-aware
stylesheets, and the 
html stylesheet works but not the xhtml (I didn't do much
with the xhtml 
side).

Bob Stayton
Sagehill Enterprises
DocBook Consulting
bobssagehill.net


----- Original Message ----- 
From: "Chris Chiasson" <chrischiasson.name>
To: "Bob Stayton" <bobssagehill.net>
Cc: "Christian Roth" <rothinfinity-loop.de>; "DocBook Apps Mailing
List" 
<docbook-appslists.oasis-open.org>
Sent: Friday, October 20, 2006 8:09 PM
Subject: Re: [docbook-apps] <link
xlink:href="..."> in XHTML output 
(DocBook XSL 1.71.1)


> Will the 1.xx.x stylesheets allow use of xlink: as the
prefix? What
> about the experimental namespace aware 1.xx.x version?
>
> On 10/20/06, Bob Stayton <bobssagehill.net> wrote:
>> Hi Christian,
>> More importantly, did you put the DocBook namespace
declaration on the 
>> root
>> element of your document?  That is what makes it a
DocBook 5 document, 
>> and
>> that is what triggers the stylesheets to handle
such links.
>>
>> Bob Stayton
>> Sagehill Enterprises
>> DocBook Consulting
>> bobssagehill.net
>>
>>
>> ----- Original Message -----
>> From: "Christian Roth" <rothinfinity-loop.de>
>> Cc: "DocBook Apps Mailing List"
<docbook-appslists.oasis-open.org>
>> Sent: Friday, October 20, 2006 3:15 PM
>> Subject: Re: [docbook-apps] <link
xlink:href="..."> in XHTML output
>> (DocBook XSL 1.71.1)
>>
>>
>> > >It is likely that you will need to use xl
as the prefix instead of
>> > >xlink.
>> >
>> > Unfortunately, this didn't work, with the
namespace declared
>> > xmlnsl=&qu
ot;http://www.w3.org/
1999/xlink"
>> >
>> > and
>> >
>> > <link xl:href="http://www.saxonica.co
m/"
>> >      xl:type="simple"
>> >      xl:actuate="onRequest">http://www.saxon
ica.com</link>
>> >
>> > I get the same result. Maybe this just isn't
implemented yet since it 
>> > is
>> > new for DB5. And if it is implemented, it
probably should not compare 
>> > on
>> > the namespace prefix, but on the namespace
name. If I get the time, 
>> > I'll
>> > try to look into the XSLTs to see what is
actually happening.
>> >
>> > Thanks anyway,
>> > Christian
>> >
>> >
>> >
------------------------------------------------------------
---------
>> > To unsubscribe, e-mail:
docbook-apps-unsubscribelists.oasis-open.org
>> > For additional commands, e-mail: 
>> > docbook-apps-helplists.oasis-open.org
>> >
>> >
>> >
>>
>>
>>
>>
------------------------------------------------------------
---------
>> To unsubscribe, e-mail:
docbook-apps-unsubscribelists.oasis-open.org
>> For additional commands, e-mail:
docbook-apps-helplists.oasis-open.org
>>
>>
>
>
> -- 
> http://chris.chiasson.nam
e/
>
>
------------------------------------------------------------
---------
> To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
> For additional commands, e-mail: docbook-apps-helplists.oasis-open.org
>
>
> 



------------------------------------------------------------
---------
To unsubscribe, e-mail: docbook-apps-unsubscribelists.oasis-open.org
For additional commands, e-mail: docbook-apps-helplists.oasis-open.org

[1]

about | contact  Other archives ( Real Estate discussion Medical topics )