Support Forum

Ask questions and get help from MobileTogether experts.
MobileTogether Product Information
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
View
Go to last post Go to first unread
tra4tor  
#1 Posted : Monday, November 16, 2020 2:34:45 PM(UTC)
tra4tor

Rank: Member

Groups: Registered
Joined: 10/1/2020(UTC)
Posts: 18
Germany
Location: niedersachsen

Thanks: 5 times
A picture is worth a thousand words
I have xml structrue like imageA.
I want to have an output like ImageB.
but node tsc:Execution has sequence of children that must be shown in table exactly as they are in xml structure.
I tried by adding two sub template in another template and show all "Step" node and then all "Assert" node but not in their exact order in mtd file.output is as ImageC.

further explanation:
the xml structure is as image1. all part working except one node that I could not find a solution for that. the reason is that one of the node has diverse children ("Step", "Assert", "MetaAssert") each with its own child attributes. the important thing is that to show each of this node's attribute in table in order that they are in xml file (first, step node then Assert node then meta node etc.) the number of each of this children is dynamic and maybe one or two node not exist and be added later.
my problem or misunderstanding is that in a repeating row only one template tree can be added as a source, therefore it is not possible to show other children content!
File Attachment(s):
mtd.zip (1,275kb) downloaded 1 time(s).
tra4tor attached the following image(s):
ImageA.png
ImageB.png
ImageC.png
bbv  
#2 Posted : Monday, November 16, 2020 2:45:12 PM(UTC)
bbv

Rank: Administration

Groups: Registered, Administrators
Joined: 7/21/2014(UTC)
Posts: 425

Was thanked: 73 time(s) in 73 post(s)
As usual, we need all your files. Simply guessing why something that complex doesn't work is impossible.

In any case it is definitely possible to render this kind of data via XPath using * operator which goes through all children in their order
tra4tor  
#3 Posted : Monday, November 16, 2020 3:10:14 PM(UTC)
tra4tor

Rank: Member

Groups: Registered
Joined: 10/1/2020(UTC)
Posts: 18
Germany
Location: niedersachsen

Thanks: 5 times
Originally Posted by: bbv Go to Quoted Post
As usual, we need all your files. Simply guessing why something that complex doesn't work is impossible.

In any case it is definitely possible to render this kind of data via XPath using * operator which goes through all children in their order


Wow such an immediate/abrupt reply. thanks for that. I was preparing my file as last attachment at the time you answer :). the zip file is attached.

by the way the problem is not how to use the xpath to show the result in order with such notation[1][2]. but with in the table when it reaches the node tsc:Execution it must render content sequentially. that it can not. Dont forget to set the Expand/Visisbility check box to see the full render. Thank you bvv.
bbv  
#4 Posted : Monday, November 16, 2020 3:49:02 PM(UTC)
bbv

Rank: Administration

Groups: Registered, Administrators
Joined: 7/21/2014(UTC)
Posts: 425

Was thanked: 73 time(s) in 73 post(s)
The key is to use a dynamic name for template. I've changed the Procedure template to do so and modified the other three templates to stay within current node

I hope this is what you were looking for
File Attachment(s):
EP1DOC2.mtd (151kb) downloaded 2 time(s).
bbv attached the following image(s):
Result.JPG
thanks 1 user thanked bbv for this useful post.
tra4tor on 11/16/2020(UTC)
tra4tor  
#5 Posted : Monday, November 16, 2020 5:07:02 PM(UTC)
tra4tor

Rank: Member

Groups: Registered
Joined: 10/1/2020(UTC)
Posts: 18
Germany
Location: niedersachsen

Thanks: 5 times
Originally Posted by: bbv Go to Quoted Post
The key is to use a dynamic name for template. I've changed the Procedure template to do so and modified the other three templates to stay within current node

I hope this is what you were looking for


That is really fantastic. So local-name() pass the name of node to placeholder. and the rest ... now I got it. is there any structured way to to get such functional perspective from MTD design insteasd of like me read part of documentation/tutorial and do the job with trial and error. The tool is really powerfull, extensive but it need to be ace xml/xquery etc. plus how to use them in mtd itself. it makes the startup abit! hard :). although implementation of simple idea is really intutive after seeing tutorial but as one go further it is not sometime easy. once more thanks for fast reply.
Users browsing this topic
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.