using editor variables in code templates
Are you missing a feature? Request its implementation here.
-
- Posts: 3
- Joined: Wed Jun 03, 2009 11:35 pm
using editor variables in code templates
Post by matthew.stephens »
I would like to write code templates that paste in some of the editor variables that are so useful in validation and transformation scenarios. If something more than ${caret} could be used, the templates become a lot more flexible.
Thanks for making such a great product, by the way!
Matthew Stephens
University of Virginia Library
Thanks for making such a great product, by the way!
Matthew Stephens
University of Virginia Library
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: using editor variables in code templates
Post by sorin_ristache »
Hello,
The editor variables are generic placeholders for environment details that are useful in actions applied to XML documents. Do these environment details have a place in the content of the edited XML document? Can you give examples?
Thank you,
Sorin
The editor variables are generic placeholders for environment details that are useful in actions applied to XML documents. Do these environment details have a place in the content of the edited XML document? Can you give examples?
Thank you,
Sorin
-
- Posts: 3
- Joined: Wed Jun 03, 2009 11:35 pm
Re: using editor variables in code templates
Post by matthew.stephens »
Here's an example of how editor variables might be used in an XML document. You might have unique identifiers that you wish to add to a <milestone> element in a file, and you would build a code template to construct the element tag and its accompanying id attribute. If you wanted to prefix each id number with the file's name (to create unique IDs across a collection of files), you would want this in your template:
If that template existed, you could type a key and get the element in your XML file, with the filename already added as part of the attribute value, with the cursor (or caret) in place to add more text to that value.
Given the kinds of markup we do here at UVA Library, that would be a great time-saver.
M.S.
Code: Select all
<milestone id="${cfn}${caret}" unit="chapter"/>
Given the kinds of markup we do here at UVA Library, that would be a great time-saver.
M.S.
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Re: using editor variables in code templates
Post by sorin_ristache »
It sounds like a good candidate for a custom Author action that would be called by pressing a toolbar button in Author mode. Author actions are developed using the Author SDK that is available on the Developer page. The action is developed once, plugged to a document type and used by all the content authors who edit XML documents of the same type.
Regards,
Sorin
Regards,
Sorin
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