Thread: [Xsltforms-support] Dynamic loading of instance into a model
Brought to you by:
alain-couthures
From: Dhiradj B. <dh...@gm...> - 2010-04-19 08:38:59
|
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 |
From: Grégoire C. <gco...@gm...> - 2010-04-19 09:20:24
|
Hello Dhiradj, Dhiradj Badloe a écrit : > 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! I guess you will have to write a simple XQuery (ex: "get_latest_xml_file.xql") which would return the instance to use. Something like : let $file := doc("/db/path_to/vte_406207_d.xml") return $file Then your XForm remains with a static file : <xf:instance id="inlinewerken" src="get_latest_xml_file.xql" /> Now you only have to find how to generate the correct path for the doc() function. And since I don't know how this name is generated, I cannot help. :) Regard, Grégoire |
From: COUTHURES A. <ala...@ag...> - 2010-04-20 19:48:50
|
Hello Dhiradj, > 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. You can use a submission to be activated automatically after form load. This has to be associated with "xforms-ready" directly into the model declaration. Sorry, I can't find a working example about that but I have already used this workaround... Thanks! -Alain |
From: Klotz, L. <Lei...@xe...> - 2010-04-30 20:24:32
|
It would be better to load the instance on xforms-model-construct-done than xforms-ready because xforms-ready tells the UI to refresh so you'll get two refreshes. Leigh. ________________________________ From: COUTHURES Alain [mailto:ala...@ag...] Sent: Tuesday, April 20, 2010 12:50 PM To: Dhiradj Badloe Cc: xsl...@li... Subject: Re: [Xsltforms-support] Dynamic loading of instance into a model Hello Dhiradj, 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. You can use a submission to be activated automatically after form load. This has to be associated with "xforms-ready" directly into the model declaration. Sorry, I can't find a working example about that but I have already used this workaround... Thanks! -Alain |
From: Dan M. <dan...@gm...> - 2010-04-21 01:13:13
|
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 |
From: Dhiradj B. <dh...@gm...> - 2010-04-21 08:13:27
|
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 > |
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 |
From: Kostis A. <ank...@gm...> - 2010-06-09 10:08:07
|
Hi Dhiradj, This logic belongs to an <xf:action> listening to 'xforms-submit-error' event. You then can add the following action in your <xf:submission> to detect what you want: <xf:action ev:event="xforms-submit-error" if="event('response-status-code')='404'" > <xf:message>Instance Missing!</xf:message> </xf:action> Please, report if it works, i've written the above code without actually trying it. For available event() properties, see http://www.w3.org/TR/xforms11/#submit-evt-submit-error Regards, Kostis On Wed, Jun 9, 2010 at 12:57 PM, Dhiradj Badloe <dh...@gm...> wrote: > Hello Kostis, > > I have another question. When there's no instance found, i want to display a > message to the user that there's no instance? Is there a good way how to do > this? Thanks. > > Dhiradj > > On Wed, Apr 21, 2010 at 12:10 PM, Kostis Anagnostopoulos > <ank...@gm...> wrote: >> >> The code for the registration of the new functions fails. >> (you should see the errors in your broswer's console) >> If it is indeed this provlem, i think it is the '>' character that >> gets xsl-translated badly in IE. >> >> Try removing completely the argument-number checks on the url-param() >> function. >> >> >> Kostis >> >> On Wed, Apr 21, 2010 at 12:53 PM, Dhiradj Badloe <dh...@gm...> >> wrote: >> > In IE8 i still have problems with the workaround from Alain. I keep >> > getting >> > this error "XSLTForms Exception Error >> > initializing:Function http://example.com/local url-param() not found". >> > I >> > have not tested it yet in IE6/7. >> > >> > Regards, >> > Dhiradj >> > >> > On Tue, Apr 20, 2010 at 2:23 PM, Kostis Anagnostopoulos >> > <ank...@gm...> >> > wrote: >> >> >> >> In IE6 and IE7 that i tested it, it works OK. >> >> The workaround is only neccesary on Firefox. >> >> >> >> Do you see any problems? >> >> >> >> Kostis >> >> >> >> >> >> On Tue, Apr 20, 2010 at 2:38 PM, Dhiradj Badloe <dh...@gm...> >> >> wrote: >> >> > Hi Kostis, >> >> > >> >> > Is there also a workaround for Internet Explorer? >> >> > >> >> > Regards, >> >> > Dhiradj >> >> > >> >> > On Tue, Apr 20, 2010 at 12:08 PM, Kostis Anagnostopoulos >> >> > <ank...@gm...> wrote: >> >> >> >> >> >> Hi Dhiradj, >> >> >> >> >> >> Actually it is indeed possible to use a distinct namespace for >> >> >> user-defined- functions on Firefox, >> >> >> as long as you apply the "bogus-namespaced-attribute" workaround >> >> >> regarding Mozilla's bug: >> >> >> https://bugzilla.mozilla.org/show_bug.cgi?id=94270 >> >> >> (It could be usefull if you had the time to register and vote for it >> >> >> ;-)) >> >> >> >> >> >> The workaround consists of adding a bogus attribute in your >> >> >> function's >> >> >> namespace in the <html> element. >> >> >> >> >> >> >> >> >> Here is a working example from Alain COUTHURES: >> >> >> (notice the local:dummy="dummy" attribute) >> >> >> >> >> >> <html xmlns="http://www.w3.org/1999/xhtml" >> >> >> xmlns:xf="http://www.w3.org/2002/xforms" >> >> >> xmlns:local="http://example.com/local" >> >> >> local:dummy="dummy"> >> >> >> <head> >> >> >> <title>Testing local XPath functions</title> >> >> >> <script> >> >> >> XPathCoreFunctions['http://example.com/local sample'] = >> >> >> new XPathFunction(false, XPathFunction.DEFAULT_NONE, >> >> >> false, >> >> >> function() { return "a test"; } ); >> >> >> </script> >> >> >> <xf:model> >> >> >> <xf:instance> >> >> >> <dummy xmlns=""/> >> >> >> </xf:instance> >> >> >> </xf:model> >> >> >> </head> >> >> >> <body> >> >> >> <p>This is <xf:output value="local:sample()" />.</p> >> >> >> </body> >> >> >> </html> >> >> >> >> >> >> >> >> >> Regards, >> >> >> Kostis >> >> >> >> >> >> >> >> >> >> >> >> On Tue, Apr 20, 2010 at 11:25 AM, Dhiradj Badloe <dh...@gm...> >> >> >> wrote: >> >> >> > Hi Kostis, >> >> >> > >> >> >> > First, I would like to thank you for your support. >> >> >> > >> >> >> > Your solution works! I have followed the workaround and removed >> >> >> > "<xf:setfocus control="ctrl-numberFrom" />" and it works flawless. >> >> >> > >> >> >> > Thanks once again! >> >> >> > >> >> >> > Best regards, >> >> >> > Dhiradj Badloe >> >> >> > >> >> >> > >> >> >> > >> >> >> > On Mon, Apr 19, 2010 at 5:54 PM, Kostis Anagnostopoulos >> >> >> > <ank...@gm...> >> >> >> > wrote: >> >> >> >> >> >> >> >> (I'm not sure what you are asking me...) >> >> >> >> >> >> >> >> Actually you don't need to fill-in anything into @src. >> >> >> >> You can skip this attributes and insert a <dummy/> element within >> >> >> >> <xf:instance>. >> >> >> >> >> >> >> >> The actual content of the instance would be set on 'xforms-ready' >> >> >> >> from >> >> >> >> the document specified in URL. >> >> >> >> >> >> >> >> Only in case it fails to load it, then the @src or the <dummy> >> >> >> >> content >> >> >> >> would matter. >> >> >> >> >> >> >> >> >> >> >> >> Did it work? >> >> >> >> >> >> >> >> Kostis >> >> >> >> >> >> >> >> On Mon, Apr 19, 2010 at 6:20 PM, Dhiradj Badloe >> >> >> >> <dh...@gm...> >> >> >> >> wrote: >> >> >> >> > Thanks! If my xforms code is as follow: >> >> >> >> > <xf:model id="InlineWerken"> >> >> >> >> > <xf:instance id="inlinewerken" src="vte_406207_d.xml" >> >> >> >> > /> >> >> >> >> > </xf:model> >> >> >> >> > what do I need to fill in for "src"? >> >> >> >> > >> >> >> >> > On Mon, Apr 19, 2010 at 4:32 PM, Kostis Anagnostopoulos >> >> >> >> > <ank...@gm...> >> >> >> >> > wrote: >> >> >> >> >> >> >> >> >> >> You are right, I just checked it, there is a not-yet-fixed bug >> >> >> >> >> in >> >> >> >> >> Firefox (and IE?) regarding extension functions. >> >> >> >> >> >> >> >> >> >> You are also right that i forgot the workaround: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> https://sourceforge.net/mailarchive/message.php?msg_name=w2o...@ma... >> >> >> >> >> >> >> >> >> >> Basically it boils down to using as namespace for the custom >> >> >> >> >> functions >> >> >> >> >> the refered one within the error. >> >> >> >> >> So, just replace everywhere the string: >> >> >> >> >> "http://some-url.net/nfuncs/" >> >> >> >> >> with: >> >> >> >> >> "http://www.w3.org/2005/xpath-functions" >> >> >> >> >> >> >> >> >> >> Kostis >> >> >> >> >> >> >> >> >> >> On Mon, Apr 19, 2010 at 5:13 PM, Dhiradj Badloe >> >> >> >> >> <dh...@gm...> >> >> >> >> >> wrote: >> >> >> >> >> > Hi Kostis, >> >> >> >> >> > >> >> >> >> >> > Thanks! I keep getting this error "XSLTForms Exception Error >> >> >> >> >> > initializing: >> >> >> >> >> > Function http://www.w3.org/2005/xpath-functions url-param() >> >> >> >> >> > not >> >> >> >> >> > found". >> >> >> >> >> > Have >> >> >> >> >> > you seen this before or do you know what's the cause of it? >> >> >> >> >> > Sorry >> >> >> >> >> > for >> >> >> >> >> > disturbing. >> >> >> >> >> > >> >> >> >> >> > Regards, >> >> >> >> >> > Dhiradj >> >> >> >> >> > >> >> >> >> >> > On Mon, Apr 19, 2010 at 3:59 PM, Kostis Anagnostopoulos >> >> >> >> >> > <ank...@gm...> >> >> >> >> >> > wrote: >> >> >> >> >> >> >> >> >> >> >> >> Hi Dhiradj, >> >> >> >> >> >> >> >> >> >> >> >> Check also the wiki: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> http://en.wikibooks.org/wiki/XSLTForms/XSLTForms_only_Extensions#User-Defined_Functions >> >> >> >> >> >> >> >> >> >> >> >> Regards, >> >> >> >> >> >> Kostis >> >> >> >> >> >> >> >> >> >> >> >> On Mon, Apr 19, 2010 at 4:43 PM, Dhiradj Badloe >> >> >> >> >> >> <dh...@gm...> >> >> >> >> >> >> wrote: >> >> >> >> >> >> > Hi Kostis, >> >> >> >> >> >> > >> >> >> >> >> >> > Thanks for your reply and great solution! >> >> >> >> >> >> > Right now i'm having a problem with xpath-functions >> >> >> >> >> >> > url-param(). >> >> >> >> >> >> > As >> >> >> >> >> >> > far >> >> >> >> >> >> > as I >> >> >> >> >> >> > can see this function is not (yet) implemented in >> >> >> >> >> >> > XSLTForms. >> >> >> >> >> >> > Is >> >> >> >> >> >> > this >> >> >> >> >> >> > true? >> >> >> >> >> >> > >> >> >> >> >> >> > Regards, >> >> >> >> >> >> > Dhiradj Badloe >> >> >> >> >> >> > >> >> >> >> >> >> > On Mon, Apr 19, 2010 at 12:00 PM, Kostis Anagnostopoulos >> >> >> >> >> >> > <ank...@gm...> wrote: >> >> >> >> >> >> >> >> >> >> >> >> >> >> Hi, >> >> >> >> >> >> >> >> >> >> >> >> >> >> I had the same requirement and i succeeded in loading >> >> >> >> >> >> >> the >> >> >> >> >> >> >> dynamically-named document on "xforms-ready" (you can >> >> >> >> >> >> >> try >> >> >> >> >> >> >> "xforms-model-construct-done"). >> >> >> >> >> >> >> The name of the file was specified as a URL-parameter, >> >> >> >> >> >> >> and >> >> >> >> >> >> >> i >> >> >> >> >> >> >> used >> >> >> >> >> >> >> a >> >> >> >> >> >> >> custom XPath function to read it from page's url as >> >> >> >> >> >> >> query-parameter. >> >> >> >> >> >> >> >> >> >> >> >> >> >> Here is the action loading the dynamic-document (put it >> >> >> >> >> >> >> in >> >> >> >> >> >> >> your >> >> >> >> >> >> >> model): >> >> >> >> >> >> >> <xf:action ev:event="xforms-ready"> >> >> >> >> >> >> >> <xf:setfocus control="ctrl-numberFrom" /> >> >> >> >> >> >> >> <xf:send submission="submit-init-doc" >> >> >> >> >> >> >> if="nfuncs:url-param('init-doc') != ''"/> >> >> >> >> >> >> >> </xf:action> >> >> >> >> >> >> >> >> >> >> >> >> >> >> You need a proper submission element, i.e.: >> >> >> >> >> >> >> <xf:submission id="submit-init-doc" >> >> >> >> >> >> >> method="GET" validate="false" >> >> >> >> >> >> >> replace="instance" instance="inlinewerken" >> >> >> >> >> >> >> > >> >> >> >> >> >> >> <xf:resource value="nfuncs:url-param('init-doc')" >> >> >> >> >> >> >> /> >> >> >> >> >> >> >> </xf:submission> >> >> >> >> >> >> >> >> >> >> >> >> >> >> To add the custom nfuncs:url-param() function, do the >> >> >> >> >> >> >> following: >> >> >> >> >> >> >> <html xmlns:nfuncs="http://some-url.net/nfuncs/" > >> >> >> >> >> >> >> <head> >> >> >> >> >> >> >> <script type="text/javascript"> >> >> >> >> >> >> >> //<![CDATA[ >> >> >> >> >> >> >> function parseUrlParam(url, param) { // from >> >> >> >> >> >> >> http://www.netlobo.com/url_query_string_javascript.html >> >> >> >> >> >> >> if(!param) >> >> >> >> >> >> >> return url; >> >> >> >> >> >> >> name = >> >> >> >> >> >> >> param.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); >> >> >> >> >> >> >> var regexS = "[\\?&#]"+param+"=([^&#]*)"; >> >> >> >> >> >> >> var regex = new RegExp( regexS ); >> >> >> >> >> >> >> var results = regex.exec( url ); >> >> >> >> >> >> >> if( results == null ) >> >> >> >> >> >> >> return ''; >> >> >> >> >> >> >> >> >> >> >> >> >> >> return results[1]; >> >> >> >> >> >> >> }; >> >> >> >> >> >> >> XPathCoreFunctions['http://some-url.net/nfuncs/ >> >> >> >> >> >> >> url-param'] >> >> >> >> >> >> >> = >> >> >> >> >> >> >> new XPathFunction(false, >> >> >> >> >> >> >> XPathFunction.DEFAULT_NONE, >> >> >> >> >> >> >> false, >> >> >> >> >> >> >> function(field) { >> >> >> >> >> >> >> if (arguments.length > 1) { >> >> >> >> >> >> >> throw { >> >> >> >> >> >> >> name : "url-param() : Invalid number of >> >> >> >> >> >> >> arguments!", >> >> >> >> >> >> >> message : "url-param() The function must >> >> >> >> >> >> >> have >> >> >> >> >> >> >> at-most >> >> >> >> >> >> >> one argument." >> >> >> >> >> >> >> }; >> >> >> >> >> >> >> } >> >> >> >> >> >> >> >> >> >> >> >> >> >> return parseUrlParam(window.location.search, >> >> >> >> >> >> >> field); >> >> >> >> >> >> >> } >> >> >> >> >> >> >> ); >> >> >> >> >> >> >> //]]> >> >> >> >> >> >> >> </script> >> >> >> >> >> >> >> </head> >> >> >> >> >> >> >> <body>... >> >> >> >> >> >> >> >> >> >> >> >> >> >> Then, you can invoke your xform with a URL like this: >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> http://you_server.net/your_xform_page.xml?init-doc=vte_406207_d.xml >> >> >> >> >> >> >> >> >> >> >> >> >> >> (code-fragments above were modified by hand, not >> >> >> >> >> >> >> actually >> >> >> >> >> >> >> tested >> >> >> >> >> >> >> if >> >> >> >> >> >> >> they still work OK) >> >> >> >> >> >> >> >> >> >> >> >> >> >> Hope it works, >> >> >> >> >> >> >> Kostis Anagnostopoulos >> >> >> >> >> >> >> >> >> >> >> >> >> >> On Mon, Apr 19, 2010 at 11: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 >> >> >> >> >> >> >> > >> >> >> >> >> >> >> > >> >> >> >> >> >> > >> >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> >> > >> >> >> >> > >> >> >> >> > >> >> >> > >> >> >> > >> >> > >> >> > >> > >> > > > |