How do use an attribute with a namespace using oxy_xpath?
Oxygen general issues.
-
- Posts: 13
- Joined: Wed Oct 12, 2011 7:51 pm
How do use an attribute with a namespace using oxy_xpath?
In a CSS, I want to insert the value of an attribute of a parent element. The attribute has a namespace. I have the namespace declared.
@namespace xlink "http://www.w3.org/1999/xlink";
I have tried this:
warning>trim\.para>link>prompt { content: oxy_xpath('parent::link/@xlink:href'); }
That produces the following error message in Author:
System ID: C:\Program Files\Oxygen XML Editor 13\frameworks\MIL-STD-2361C\css\Production.css
Severity: error
Description: [CSS]:XPath failed: XPath failed due to: Prefix xlink has not been declared
I have also tried:
warning>trim\.para>link>prompt { content: oxy_xpath('parent::link/@xlink|href'); }
which renders nothing.
Is there way to make this work?
@namespace xlink "http://www.w3.org/1999/xlink";
I have tried this:
warning>trim\.para>link>prompt { content: oxy_xpath('parent::link/@xlink:href'); }
That produces the following error message in Author:
System ID: C:\Program Files\Oxygen XML Editor 13\frameworks\MIL-STD-2361C\css\Production.css
Severity: error
Description: [CSS]:XPath failed: XPath failed due to: Prefix xlink has not been declared
I have also tried:
warning>trim\.para>link>prompt { content: oxy_xpath('parent::link/@xlink|href'); }
which renders nothing.
Is there way to make this work?
-
- Posts: 13
- Joined: Wed Oct 12, 2011 7:51 pm
Re: How do use an attribute with a namespace using oxy_xpath?
You can ignore this posting. I figured this out looking at some other code you sent me. I see that by using an asterisk (*) in place of the namespace name the error is not generated.
I implemented the following:
warning>trim\.para>link>prompt {
content: oxy_xpath('parent::link/@*:href')
}
This renders as I wanted.
I implemented the following:
warning>trim\.para>link>prompt {
content: oxy_xpath('parent::link/@*:href')
}
This renders as I wanted.
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: How do use an attribute with a namespace using oxy_xpath?
Hi Charles,
Yes, the asterisk is a workaround for a problem in 13.1.
Oxygen 13.2 will also work with your first approach.
Regards,
Radu
Yes, the asterisk is a workaround for a problem in 13.1.
Oxygen 13.2 will also work with your first approach.
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