XML Refactoring > Wrap element content
Posted: Sat Oct 22, 2016 7:15 pm
I'm having a problem using XML Refactoring > Wrap element content
Within an .xml file I want to wrap the contents of all <li> elements in the file with a <p> element e.g
e.g to change a file
from
<li>a</li>
<li>b</li>
to
<li><p>a</p></li>
<li><p>b</p></li>
Error:-
I get the following error when I try and use the "Wrap element content" operation.
"Description: XQST0059: java.io.FileNotFoundException: http://www.oxygenxml.com/ns/xmlRefactor ... commons.xq"
Steps leading to the error above:-
In the XML Refactoring dialog box, for "Wrap element content", I needed to specify three settings:
1. Target elements (XPath)--> I chose "li"
2. Wrapper element, local name --> I chose "p" from the drop-down menu
3.. Namespace --> I chose <NO_NAMESPACE> (I also have experimented with some of the many other namespaces available)
(at the bottom there is a note --> "Each prefix used in an XPath expression must be declared in the Default prefix-namespace mappings section.)
I went to the "Default prefix-namespace mappings", which opens the Preferences dialog box for XML/XSLT-FO-XQuery / XPath
In section "XPath Default Namespace (only for XPath version 2.0)"
I selected radio button "Use the default namespace from the root element"
For "Default prefix-namespace mappings"
I added Prefix = "li" and Namespace URI = "http://www.w3.org/2001/XMLSchema
Questions:-
a) Do I need to add Default prefix-namespace mappings for "li" and "p" ?
b) If yes, which namespace URI do I use for each of these "li" and "p" prefixes?
Thanks in advance.
Within an .xml file I want to wrap the contents of all <li> elements in the file with a <p> element e.g
e.g to change a file
from
<li>a</li>
<li>b</li>
to
<li><p>a</p></li>
<li><p>b</p></li>
Error:-
I get the following error when I try and use the "Wrap element content" operation.
"Description: XQST0059: java.io.FileNotFoundException: http://www.oxygenxml.com/ns/xmlRefactor ... commons.xq"
Steps leading to the error above:-
In the XML Refactoring dialog box, for "Wrap element content", I needed to specify three settings:
1. Target elements (XPath)--> I chose "li"
2. Wrapper element, local name --> I chose "p" from the drop-down menu
3.. Namespace --> I chose <NO_NAMESPACE> (I also have experimented with some of the many other namespaces available)
(at the bottom there is a note --> "Each prefix used in an XPath expression must be declared in the Default prefix-namespace mappings section.)
I went to the "Default prefix-namespace mappings", which opens the Preferences dialog box for XML/XSLT-FO-XQuery / XPath
In section "XPath Default Namespace (only for XPath version 2.0)"
I selected radio button "Use the default namespace from the root element"
For "Default prefix-namespace mappings"
I added Prefix = "li" and Namespace URI = "http://www.w3.org/2001/XMLSchema
Questions:-
a) Do I need to add Default prefix-namespace mappings for "li" and "p" ?
b) If yes, which namespace URI do I use for each of these "li" and "p" prefixes?
Thanks in advance.