Re: [Xsltforms-support] Dynamic loading of instance into a model
Brought to you by:
alain-couthures
From: Dan M. <dan...@gm...> - 2010-04-21 13:58:07
|
> Is it possible to load parts of one large XML file? If you run on eXist this is pretty easy. You would create a RESTful service and pass it a URL parameter with the element name of the subsection of the large file. Around four lines of XQuery. You put that URL in the action of the submission element. On non-eXist systems you would have to first write a RESTful server-side script that knows how to parse the XML file and then returns the subsection you wanted. You can do this using Saxon XQuery library and Java but it might be less work in the long run to use eXist as a back end. Just a suggestion. - Dan On Wed, Apr 21, 2010 at 3:13 AM, Dhiradj Badloe <dh...@gm...> wrote: > Hello Dan, > > Thanks for your reply. Right now i'm not using eXist or XQuery. I load the > instance from the local file system. I've succeeded in dynamically loading > an instance into a model with the example of Kostis Anagnostopoulos. > > I'm surely interested in 'Incremental Model Loading'. I have looked at the > example that you have mentioned. In this example 3 separate XML-files are > used. Is it possible to load parts of one large XML file? > > Thanks. > > Regards, > Dhiradj Badloe > > > > > On Wed, Apr 21, 2010 at 3:13 AM, Dan McCreary <dan...@gm...>wrote: > >> Hello, >> >> Are you using eXist or a similar XQuery server to generate your forms? >> >> I am not sure how to list the files from a static file system but if you >> are using eXist to dynamically create the form this is easy. You just get >> all the file resources with xmldb:get-child-resources($collection) and then >> create the form from the resource name you want. >> >> So the like would look like this: >> >> <xf:instance id="inlinewerken" src="{$file-name}" /> >> >> If you are interesting in "incremental model loading" where you only load >> the parts of a large model when you need it I have an example here: >> >> http://en.wikibooks.org/wiki/XForms/Incremental_Model_Loading >> >> I created forms with over 250 elements and had to put each portion on a >> separate tab. Each tab incrementally loaded part of the model. It made a >> big different in load times. >> >> I hope that helps! - Dan >> >> On Mon, Apr 19, 2010 at 3:38 AM, Dhiradj Badloe <dh...@gm...>wrote: >> >>> Hello, >>> >>> I have a question about the dynamic loading of an instance into a model. >>> Here's in example of my code: >>> <xf:model id="InlineWerken"> >>> <xf:instance id="inlinewerken" src="vte_406207_d.xml" /> >>> </xf:model> >>> The xml file is read from a local folder. This name of the XML file will >>> be different every time.(based on exports from another application). I'm >>> looking for a solution how to dynamically load the instance in the model. >>> Can someone help or advise me on this? Thanks! >>> >>> Regard, >>> >>> Dhiradj >>> >>> >>> ------------------------------------------------------------------------------ >>> Download Intel® Parallel Studio Eval >>> Try the new software tools for yourself. Speed compiling, find bugs >>> proactively, and fine-tune applications for parallel performance. >>> See why Intel Parallel Studio got high marks during beta. >>> http://p.sf.net/sfu/intel-sw-dev >>> _______________________________________________ >>> Xsltforms-support mailing list >>> Xsl...@li... >>> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >>> >>> >> >> >> -- >> Dan McCreary >> Semantic Solutions Architect >> syntactica.com >> 952-460-1674 >> VOIP: 111@69.199.167.229 >> > > -- Dan McCreary Semantic Solutions Architect syntactica.com 952-460-1674 VOIP: 111@69.199.167.229 |