change attributes operation
-
- Posts: 2
- Joined: Wed Nov 25, 2020 3:50 pm
change attributes operation
Hi,
i am building an oxygen framework to annotate xml files using the TEI-namespace. In the author mode i created an action to use the ChangeAttributesOperation (screenshot), but i can't figure out how. I always get the error "The attribute name is not valid XML" (translated from German, see photo). I tried without ", with ' around the namespace and attribute name and several other options.
Code:
({"http://www.tei-c.org/ns/1.0"}ref)
({"http://www.tei-c.org/ns/1.0"}corresp)
({"http://www.tei-c.org/ns/1.0"}when)
Regards,
Philipp
i am building an oxygen framework to annotate xml files using the TEI-namespace. In the author mode i created an action to use the ChangeAttributesOperation (screenshot), but i can't figure out how. I always get the error "The attribute name is not valid XML" (translated from German, see photo). I tried without ", with ' around the namespace and attribute name and several other options.
Code:
({"http://www.tei-c.org/ns/1.0"}ref)
({"http://www.tei-c.org/ns/1.0"}corresp)
({"http://www.tei-c.org/ns/1.0"}when)
Regards,
Philipp
changeAttributeOperation.png
errorMessage.PNG
You do not have the required permissions to view the files attached to this post.
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: change attributes operation
Hi,
Usually XML attributes are in no namespace, even if XML elements themselves are in a namespace.
So for your case you simply need to write:
https://en.wikipedia.org/wiki/XML_namespace
Radu
Usually XML attributes are in no namespace, even if XML elements themselves are in a namespace.
So for your case you simply need to write:
Code: Select all
ref
corresp
when
Regards,Attributes are never subject to the default namespace. An attribute without an explicit namespace prefix is considered not to be in any namespace.
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 2
- Joined: Wed Nov 25, 2020 3:50 pm
Re: change attributes operation
Hi,
thank you very much. I was mislead by the information in the desciption of the argument, suggesting the use of a namespace:
"The names of the attributes to change/insert/remove, each on a new line. The provided values can be local names or Clark notations ({attribute_namespace}attibute_name)."
Regards,
Philipp
thank you very much. I was mislead by the information in the desciption of the argument, suggesting the use of a namespace:
"The names of the attributes to change/insert/remove, each on a new line. The provided values can be local names or Clark notations ({attribute_namespace}attibute_name)."
Regards,
Philipp
-
- Posts: 9431
- Joined: Fri Jul 09, 2004 5:18 pm
Re: change attributes operation
Hi Philipp,
Right, I will correct the description of the parameter, the clark notation should be inserted directly as {namespace}name and not with extra () parenthesis around it.
But in the case of TEI almost all TEI attributes are in no namespace, they do not have an explicit namespace (as they do not inherit the namespace of the TEI elements).
There are only a couple of attributes which are namespaced and they all have prefixes like "xml:space". If you will ever want to set value for the "xml:*" attributes in TEI the clark notations will be for example {http://www.w3.org/XML/1998/namespace}space because according to the XML specification the "xml" prefix is always bound to the ttp://www.w3.org/XML/1998/namespace namespace.
Regards,
Radu
Right, I will correct the description of the parameter, the clark notation should be inserted directly as {namespace}name and not with extra () parenthesis around it.
But in the case of TEI almost all TEI attributes are in no namespace, they do not have an explicit namespace (as they do not inherit the namespace of the TEI elements).
There are only a couple of attributes which are namespaced and they all have prefixes like "xml:space". If you will ever want to set value for the "xml:*" attributes in TEI the clark notations will be for example {http://www.w3.org/XML/1998/namespace}space because according to the XML specification the "xml" prefix is always bound to the ttp://www.w3.org/XML/1998/namespace namespace.
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)
- ↳ 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