[XQuery/XForms] Change state elements of milestone elements in a specific order
Questions about XML that are not covered by the other forums should go here.
-
- Posts: 1
- Joined: Wed Mar 08, 2017 11:29 am
[XQuery/XForms] Change state elements of milestone elements in a specific order
Hello there,
I want to realize the functionality of a milestone chain where the states of the milestones should be edited step by step in a chronological order. For that I use XML as data structure, XQuery for the functionality and XForms and HTML for the user interface. I use eXist-db as the platform for the implementation.
My aim described with an example: The possible states of the milestones could be 'not started yet' and 'successful'. For example the user should just be able to change the state of the second milestone in the chain when the first milestone is already successful. The other way around: First the user has to declare the milestone on positon 1 as 'successful' before he is able to declare the second milestone as 'successful'.
Don't really know how to realize that. My first thought was to build the data structure of a milestone chain like that:
My thought is that I can check if the content of the element 'currentMilestone' is equal to the 'position' attribute of one of the containing milestones. If yes, the user should be able to change the content of the state element of exactly that milestone. But how can I realize that exactly that state element can be changed where the position attribute is equal to currentMilestone?
currentMilestone should be increased by 1 after changing the state but I think this is the smaller problem.
Best regards,
Felix
I want to realize the functionality of a milestone chain where the states of the milestones should be edited step by step in a chronological order. For that I use XML as data structure, XQuery for the functionality and XForms and HTML for the user interface. I use eXist-db as the platform for the implementation.
My aim described with an example: The possible states of the milestones could be 'not started yet' and 'successful'. For example the user should just be able to change the state of the second milestone in the chain when the first milestone is already successful. The other way around: First the user has to declare the milestone on positon 1 as 'successful' before he is able to declare the second milestone as 'successful'.
Don't really know how to realize that. My first thought was to build the data structure of a milestone chain like that:
Code: Select all
<milestoneChain>
<currentMilestone>1</currentMilestone>
<milestone position="1">
<name>Milestone 1</name>
<state>not started yet</state>
</milestone>
<milestone position="2">
<name>Milestone 2</name>
<state>not started yet</state>
</milestone>
<milestone position="3">
<name>Milestone 3</name>
<state>not started yet</state>
</milestone>
<milestoneChain/>
currentMilestone should be increased by 1 after changing the state but I think this is the smaller problem.
Best regards,
Felix
Return to “General XML Questions”
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