Possible to determine available attributes on not yet insert
Post here questions and problems related to oXygen frameworks/document types.
-
- Posts: 16
- Joined: Tue Aug 05, 2014 8:36 pm
Possible to determine available attributes on not yet insert
Post by ArbitraryName »
I am looking to create a generic UI where it would be useful for me to be able to determine the possible attributes on a given element about to be inserted. It looks like AuthorSchemaManager has some useful functions that apply to elements already existing in a document, but I need to introspect the options before insertion. Is there any way to do this through the SDK? I see createWhatAttributesCanGoHereContext(AuthorElement element) but am unsure as to how I might create an AuthorElement.
-
- Posts: 1016
- Joined: Wed Nov 16, 2005 11:11 am
Re: Possible to determine available attributes on not yet in
Post by alex_jitianu »
Hello,
You can get the possible attribute of an element (without it being actually in the document) like this:
Best regards,
Alex
You can get the possible attribute of an element (without it being actually in the document) like this:
Code: Select all
WhatElementsCanGoHereContext whatElementsCanGoHereContext = authorSchemaManager.createWhatElementsCanGoHereContext(offset);
List<CIElement> whatElementsCanGoHere = authorSchemaManager.whatElementsCanGoHere(whatElementsCanGoHereContext);
for (CIElement ciElement : whatElementsCanGoHere) {
// TODO Look for the CIElement of interest (the one that will be inserted)
if ("p".equals(ciElement.getName())) {
// Then get its attributes like this:
List<CIAttribute> attributes = ciElement.getAttributes();
}
}
Alex
Return to “SDK-API, Frameworks - Document Types”
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