Can't add an xlink:href to a link in DocBook 5 in Oxygen 12
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Can't add an xlink:href to a link in DocBook 5 in Oxygen 12
Hi there,
I'm probably missing something simple, but I can't seem to enter a hyperlink to a url in DocBook 5.x using the Author view.
In Oxygen 12.0 (and 12.1), in a DocBook 5.x document when I insert a <link> element, Oxygen correctly flags it as invalid because I haven't yet entered an attribute like linkend or xlink:href to define a target. However, when I use ALT+Enter to bring up the Attributes View and type ns1:href in the Name field, and then enter a url in the Value field, the Close button remains disabled, making it impossible to add the attribute. The Attribute View will, however, let me enter a linkend attribute.
If I go into the text view and manually enter <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.google.com">This is a hyperlink</link>, then return to the Author view, the document is valid.
What am I missing?
Thanks,
David
I'm probably missing something simple, but I can't seem to enter a hyperlink to a url in DocBook 5.x using the Author view.
In Oxygen 12.0 (and 12.1), in a DocBook 5.x document when I insert a <link> element, Oxygen correctly flags it as invalid because I haven't yet entered an attribute like linkend or xlink:href to define a target. However, when I use ALT+Enter to bring up the Attributes View and type ns1:href in the Name field, and then enter a url in the Value field, the Close button remains disabled, making it impossible to add the attribute. The Attribute View will, however, let me enter a linkend attribute.
If I go into the text view and manually enter <link xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="http://www.google.com">This is a hyperlink</link>, then return to the Author view, the document is valid.
What am I missing?
Thanks,
David
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Re: Can't add an xlink:href to a link in DocBook 5 in Oxygen 12
Ok, the moment I hit send, it occurred to me what was wrong. I have to have xmlns:xlink="http://www.w3.org/1999/xlink" on some ancestor element for it to work. That's ok, but as a feature request would it be possible to have the Attribute View mechanism just add the namespace to the link element if it's not there already?
Thanks,
David
Thanks,
David
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Can't add an xlink:href to a link in DocBook 5 in Oxygen 12
Hi David,
Thanks for the feedback.
So indeed the easy way would have been to add the namespace declaration on the article's root.
But this issue:
If we manage to also squeeze the fix in an Oxygen 12.1 maintenance release it will probably be listed here:
http://www.oxygenxml.com/rssBuildID.xml
Also:
When inserting the <link>-type elements from the Author toolbar we can modify the inserted XML fragment so that it also declares the xmlns:xlink attribute. This will make it easier to use the Attributes view. This fix will probably be available in an Oxygen 12.1 maintenance release.
Regards,
Radu
Thanks for the feedback.
So indeed the easy way would have been to add the namespace declaration
Code: Select all
xmlns:xlink="http://www.w3.org/1999/xlink"
But this issue:
Is a bug in Oxygen and we'll probably fix it in Oxygen 12.2.However, when I use ALT+Enter to bring up the Attributes View and type ns1:href in the Name field, and then enter a url in the Value field, the Close button remains disabled, making it impossible to add the attribute. The Attribute View will, however, let me enter a linkend attribute.
If we manage to also squeeze the fix in an Oxygen 12.1 maintenance release it will probably be listed here:
http://www.oxygenxml.com/rssBuildID.xml
Also:
When inserting the <link>-type elements from the Author toolbar we can modify the inserted XML fragment so that it also declares the xmlns:xlink attribute. This will make it easier to use the Attributes view. This fix will probably be available in an Oxygen 12.1 maintenance release.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Re: Can't add an xlink:href to a link in DocBook 5 in Oxygen 12
Hi Radu,
I noticed on the rss feed that for Build ID 2011012011 it says "Now the XLink namespace is declared by default when inserting an image in a DocBook 5 document edited in Author mode." However when I upgraded tested it, the behavior is as it was before.
Thanks,
David
I noticed on the rss feed that for Build ID 2011012011 it says "Now the XLink namespace is declared by default when inserting an image in a DocBook 5 document edited in Author mode." However when I upgraded tested it, the behavior is as it was before.
Thanks,
David
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Can't add an xlink:href to a link in DocBook 5 in Oxygen 12
Hi David,
The modifications were done in the Docbook 5 document type saved in OXYGEN_INSTALL_DIR\frameworks\docbook\docbook5.framework to the actions which are used to insert references like <link> to also declare the xlink prefix namespace mapping.
So if you are using a customized version of the Docbook 5 framework then the modifications are not in your modified framework.
Also if the Docbook root element or any parent element also declares the xlink namespace mapping the action which links will no longer re-declare the mapping.
Regards,
Radu
The modifications were done in the Docbook 5 document type saved in OXYGEN_INSTALL_DIR\frameworks\docbook\docbook5.framework to the actions which are used to insert references like <link> to also declare the xlink prefix namespace mapping.
So if you are using a customized version of the Docbook 5 framework then the modifications are not in your modified framework.
Also if the Docbook root element or any parent element also declares the xlink namespace mapping the action which links will no longer re-declare the mapping.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 163
- Joined: Sat Aug 28, 2010 1:23 am
Re: Can't add an xlink:href to a link in DocBook 5 in Oxygen 12
Hi Radu,
I've discovered the problem: the xlink ns is there if you insert the link using the menu, but not if you use the content completion mechanism. What you have to do is add the link action to the content completion and element list and then filter the link element from all of those. Then it works no matter what mechanism you use to insert the link.
The new "Filter" mechanism is very nice btw. I'm adding actions for complex elements like <procedure> and then filtering the standard element from all contexts so that the user always inserts the template I provide from the action. I'm also changing the bold and italic buttons to be dropdown buttons with a list of semantic inlines that map in our xsls to that presentation. I think this will help new writers use semantic markup.
Thanks,
David
I've discovered the problem: the xlink ns is there if you insert the link using the menu, but not if you use the content completion mechanism. What you have to do is add the link action to the content completion and element list and then filter the link element from all of those. Then it works no matter what mechanism you use to insert the link.
The new "Filter" mechanism is very nice btw. I'm adding actions for complex elements like <procedure> and then filtering the standard element from all contexts so that the user always inserts the template I provide from the action. I'm also changing the bold and italic buttons to be dropdown buttons with a list of semantic inlines that map in our xsls to that presentation. I think this will help new writers use semantic markup.
Thanks,
David
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Can't add an xlink:href to a link in DocBook 5 in Oxygen 12
Hi David,
Yes, the fix is only for the actions used for insertion using the toolbar or main menu.
We will consider using the content completion filter for this.
Regards,
Radu
Yes, the fix is only for the actions used for insertion using the toolbar or main menu.
We will consider using the content completion filter for this.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service