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
X.MAQUET  
#1 Posted : Thursday, May 7, 2015 11:04:23 AM(UTC)
X.MAQUET

Rank: Newbie

Groups: Registered
Joined: 5/7/2015(UTC)
Posts: 7
France, Metropolitan
Location: TOURS

hello,
I defined a global ressource 'folder' with a collection of xml files ; some of my files are refered in the other with an URI.
For use elements of my refered files (here 'title'), i try to do xpath in a label ou button control, like this :
Quote:
for $x in doc(concat( "sources" , @sc:refUri ) )/sc:item/em:module/em:moduleM
return $x/sp:title


My global resource folder is 'sources' in folder 'ISTC_Famas'
My MTD file is in /ISTC_Famas
My default file is 'carnet_FA.xml' in /sources

ie : in my default file I refere :
Quote:
<sp:module sc:refUri="/FA_Fusil_Assaut/module_E/module_E.xml"/>


using the XPATH, the error is :
Quote:
Cannot retrieve resource 'file:///C:/Users/X%20MAQUET/Documents/Altova/MobileTogetherDesigner1/MobileTogetherDesignerExamples/ISTC_Famas/sources/FA_Fusil_Assaut/module_E/module_E.xml'
bbv  
#2 Posted : Thursday, May 7, 2015 11:10:57 AM(UTC)
bbv

Rank: Administration

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

Was thanked: 81 time(s) in 81 post(s)
In MobileTogether the doc() function is intentionally disabled. This is because XPath in most cases runs on clients, whereas files are located somewhere on server and need to be transferred to client.

In order to load files, you need to add them as Page Sources which you can then use in XPath statement. Note - you can reduce network traffic by defining Page Sources as Server only, if this fits in your task.


Altova MobileTogether Experts
X.MAQUET  
#3 Posted : Thursday, May 7, 2015 11:37:28 AM(UTC)
X.MAQUET

Rank: Newbie

Groups: Registered
Joined: 5/7/2015(UTC)
Posts: 7
France, Metropolitan
Location: TOURS

Thanks.

So, how can I add my files by URI, in a page source ? using XSD and XPATH ?

Example:
<carnet>
<module refUri='/module_A/module_A.xml'/>
<module refUri='/module_B/module_B.xml'/>
<module refUri='/module_C/module_C.xml'/>
</carnet>

I have a page for carnet and module.
I need to load all my files on the client, because the users are most of time out of network.
bbv  
#4 Posted : Thursday, May 7, 2015 5:23:37 PM(UTC)
bbv

Rank: Administration

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

Was thanked: 81 time(s) in 81 post(s)
Currently loading via XPath only works for HTTP sources, so if you have a chance to make your files available via HTTP - you can do it already now.

Load from File doesn't have an option to select files via XPath yet - this is on our to do for future releases.
bbv  
#5 Posted : Friday, May 8, 2015 9:15:46 AM(UTC)
bbv

Rank: Administration

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

Was thanked: 81 time(s) in 81 post(s)
One thing which came to my mind - you could use Altova MapForce to preprocess your input files in all those cases where MobileTogether is not sufficient. MobileTogether natively supports FlowForce sources
X.MAQUET  
#6 Posted : Tuesday, May 26, 2015 2:54:55 PM(UTC)
X.MAQUET

Rank: Newbie

Groups: Registered
Joined: 5/7/2015(UTC)
Posts: 7
France, Metropolitan
Location: TOURS

I done it : it's all right now.
Just have a question about images in global ressource...another post...
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.