xsltforms-support Mailing List for XSLTForms (Page 108)
Brought to you by:
alain-couthures
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(6) |
Jun
(9) |
Jul
(16) |
Aug
(5) |
Sep
(43) |
Oct
(36) |
Nov
(58) |
Dec
(43) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(79) |
Feb
(81) |
Mar
(107) |
Apr
(93) |
May
(85) |
Jun
(54) |
Jul
(64) |
Aug
(54) |
Sep
(45) |
Oct
(53) |
Nov
(34) |
Dec
(77) |
2011 |
Jan
(56) |
Feb
(53) |
Mar
(52) |
Apr
(66) |
May
(44) |
Jun
(16) |
Jul
(28) |
Aug
(5) |
Sep
(15) |
Oct
(21) |
Nov
(51) |
Dec
(46) |
2012 |
Jan
(16) |
Feb
(38) |
Mar
(47) |
Apr
(45) |
May
(41) |
Jun
(41) |
Jul
(72) |
Aug
(17) |
Sep
(10) |
Oct
(16) |
Nov
(29) |
Dec
(30) |
2013 |
Jan
(25) |
Feb
(13) |
Mar
(20) |
Apr
(25) |
May
(34) |
Jun
(8) |
Jul
(12) |
Aug
(9) |
Sep
(21) |
Oct
(19) |
Nov
(6) |
Dec
(2) |
2014 |
Jan
(14) |
Feb
(8) |
Mar
(7) |
Apr
(13) |
May
(33) |
Jun
(13) |
Jul
(6) |
Aug
(5) |
Sep
(5) |
Oct
(34) |
Nov
(7) |
Dec
|
2015 |
Jan
(1) |
Feb
(6) |
Mar
(17) |
Apr
(12) |
May
(10) |
Jun
(18) |
Jul
(31) |
Aug
(9) |
Sep
(3) |
Oct
(6) |
Nov
(19) |
Dec
(1) |
2016 |
Jan
(18) |
Feb
(4) |
Mar
(13) |
Apr
(19) |
May
|
Jun
(17) |
Jul
(7) |
Aug
|
Sep
(3) |
Oct
(6) |
Nov
(3) |
Dec
|
2017 |
Jan
(5) |
Feb
(17) |
Mar
(4) |
Apr
(8) |
May
(3) |
Jun
|
Jul
(8) |
Aug
(2) |
Sep
|
Oct
(5) |
Nov
(6) |
Dec
(4) |
2018 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(6) |
Nov
|
Dec
(1) |
2019 |
Jan
|
Feb
|
Mar
(4) |
Apr
(2) |
May
(4) |
Jun
|
Jul
|
Aug
(2) |
Sep
(7) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
(13) |
Feb
(17) |
Mar
(8) |
Apr
(11) |
May
(15) |
Jun
(11) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(6) |
2021 |
Jan
(9) |
Feb
(26) |
Mar
(17) |
Apr
|
May
(7) |
Jun
(18) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(10) |
2022 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(2) |
Sep
(3) |
Oct
(2) |
Nov
(10) |
Dec
(1) |
2023 |
Jan
(10) |
Feb
|
Mar
(7) |
Apr
(8) |
May
(3) |
Jun
|
Jul
|
Aug
|
Sep
(8) |
Oct
(11) |
Nov
(8) |
Dec
(5) |
2024 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(4) |
Feb
(2) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Lorenzo De T. <lor...@gm...> - 2009-09-10 14:09:45
|
Is it possible to generate an xhtml document with an xform with php, based on xsltforms? $xsl->importStyleSheet($doc); $doc->load($xml_filename); echo $xsl->transformToXML($doc); I have tried, but it seems it needs the <?xml-stylesheet href="../xforms/xsltforms/xsltforms.xsl" type="text/xsl"?> line to understand where are the xsltforms subfolders. Thank you for your help. -- Salta la crisi! Investi in comunicazione <http://isotype.org/?lang=it> -- Lorenzo De Tomasi ISOTYPE.org | comunica la qualità ["Multimodale" rispetto a "multimediale" vuole affermare la necessità di indagare non più sul veicolo o la tecnologia di trasmissione della comunicazione, ma sul modo in cui si veicola la comunicazione, il modo in cui la si struttura rispetto all'utente e, cioè, sul progetto.] Il portfolio illustrato dei miei lavori: http://tinyurl.com/2fgl63 Il mio curriculum vitae: http://tinyurl.com/4l2u8v Il mio blog (in costruzione): http://www.isotype.org/?lang=it ^^^^^^^^^^ Rispetta il tuo ambiente, pensa prima di stampare questa e-mail. Grazie. Please consider the environment before printing this email. Thank you. |
From: COUTHURES A. <ala...@ag...> - 2009-09-09 12:29:52
|
Hello Rusco, > Thank you Alain, your latest patch fixes the troubles I had with case > statements. Those modifications are typical differences between XForms 1.0 and XForms 1.1. They are not especially difficult to implement but each requires something like one hour... > > There is still the cornercase of multiple - selected = "true" - > statements outstanding, but this is really low prio. "Error" treatments are not yet my priority but I agree those situations might also appear... > > What about promoting the current trunk to a new relase ? Yet another time problem... Plenty of tests have to be performed with all the recent browsers (help is welcome ;-) ). Before the end of September seems, for me, to be a possible challenge. Thanks! -Alain |
From: Rusco <j.r...@gm...> - 2009-09-09 08:36:37
|
Thank you Alain, your latest patch fixes the troubles I had with case statements. There is still the cornercase of multiple - selected = "true" - statements outstanding, but this is really low prio. What about promoting the current trunk to a new relase ? Best Regards Rusco. 2009/7/22 <j.r...@gm...> > Hi Alain, > > You probably know this already, I just send you this as a reminder that it > get's not lost in the current development roadmap: > > I tested some examples of the XForms Wikibook against Mozilla-0.87-pre and > XsltForms (2 days old SVN Snapshot ) and noticed that the "switch" behaviour > is different: > > Example: > > <xf:*switch*> > <xf:*case *id="1" selected="true">1</xf:case> > <xf:*case *id="2" selected="true">2</xf:case> > <xf:*case *id="3">3</xf:case> > </xf:*switch*> > > Missing behaviour 1: If no select attribute is present, according to the > Spec the first case should be activated: > > See: > http://www.w3.org/MarkUp/Forms/specs/XForms1.1/index-all-20090604.html#ui-switch-module-> Point: 9.2.2 > > Missing behaviour 2: If multiple selected="true" attributes are present, > the first one shall be activated. > > Here the 2 real-world examples from the Wikibook: > http://en.wikibooks.org/wiki/XForms/Switch_and_Case > http://en.wikibooks.org/wiki/XForms/Show-Hide_Controls > > Xsltforms Rocks !!! > > Regards > Rusco > > > |
From: COUTHURES A. <ala...@ag...> - 2009-09-01 15:22:56
|
Ciao Lorenzo, > I have written an xform that uses "anyURI" (XML Schema Primitive > Datatype) > <http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#built-in-primitive-datatypes> > but it doesn't seem supported by XSLTForms. > > <xf:bind id="photo" nodeset="/person/photo/@uri" type="xsd:anyURI" /> > > Firefox outputs a Javascript error: Type anyURI not defined > > What about a future implementation? anyURI and others datatypes support has been added in the SVN repository. Have a look at http://xsltforms.svn.sourceforge.net/viewvc/xsltforms/trunk/build/ > > Thanks for the wonderful application! Because inline elements are now generated instead of table elements, XSLTForms is even more wonderful ! ;-) Thank you for your feedback, -Alain (from Bordeaux !) |
From: Lorenzo De T. <lor...@gm...> - 2009-09-01 15:04:19
|
Ciao from Italy, I have written an xform that uses "anyURI" (XML Schema Primitive Datatype) < http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#built-in-primitive-datatypes> but it doesn't seem supported by XSLTForms. <xf:bind id="photo" nodeset="/person/photo/@uri" type="xsd:anyURI" /> Firefox outputs a Javascript error: Type anyURI not defined What about a future implementation? Thanks for the wonderful application! -- Salta la crisi! Investi in comunicazione <http://isotype.org/?lang=it> -- Lorenzo De Tomasi ISOTYPE.org | comunica la qualità ["Multimodale" rispetto a "multimediale" vuole affermare la necessità di indagare non più sul veicolo o la tecnologia di trasmissione della comunicazione, ma sul modo in cui si veicola la comunicazione, il modo in cui la si struttura rispetto all'utente e, cioè, sul progetto.] Il portfolio illustrato dei miei lavori: http://tinyurl.com/2fgl63 Il mio curriculum vitae: http://tinyurl.com/4l2u8v Il mio blog (in costruzione): http://www.isotype.org/?lang=it ^^^^^^^^^^ Rispetta il tuo ambiente, pensa prima di stampare questa e-mail. Grazie. Please consider the environment before printing this email. Thank you. |
From: Stephen C. <Ste...@ut...> - 2009-08-12 23:48:05
|
After sleeping on this problem, the solution became obvious. Basically the difference between the case that works (the submission) and the one that does not (the select1) is that the submission instance has been preset with the missing namespace. So if you do the following: <xf:instance id="inst_project_role_person" src="../deegree-wfs/services?service=WFS&version=1.1.0&request=GetFeature&namespace=xmlns(aatams=http://www.imos.org.au/aatams)&typename=aatams:project_role_person"> <data xmlns=""> <aatams:project_role_person gml:id=""> <aatams:person_ref> <aatams:person gml:id=""/> </aatams:person_ref> </aatams:project_role_person> </data> </xf:instance> You don't seem to have a problem. This is non-standard of course but hey, it works. -------- Original Message -------- Subject: attribute namespace problem Date: Wed, 12 Aug 2009 12:21:11 +1000 From: Stephen Cameron <ste...@ut...> To: xsl...@li... Hello I am getting an error in Firefox with an XPath having an predicate containing an attribute with a namespace. This is the code in question: <xf:select1 bind="project_role_person" appearance="minimal" incremental="true()"> <xf:label>Person</xf:label> <xf:item> <xf:label/> <xf:value/> </xf:item> <xf:itemset nodeset="instance('inst_project_role_person')//aatams:project_role_person[aatams:project_ref/aatams:project/@gml:id=instance('inst_prp')/project_id]"> <xf:value ref="@gml:id"/> <xf:label ref="aatams:person_ref/aatams:person/aatams:name"/> </xf:itemset> <xf:help>This is a presently unhelpful help message</xf:help> </xf:select1> The problem sees to be the use of @gml:id, the error I see is: Error: XForms Error (10): Error parsing XPath expression: instance('inst_project_role_person')//aatams:project_role_person[aatams:project_ref/aatams:project/@gml:id=instance('inst_prp')/project_id] Elsewhere the same use of @gml:id is not causing a problem so I suspect it is an issue with the select1 implementation only. For example the code below works in my submit, which is doing exactly the same thing (I think). <xf:insert nodeset="instance('inst_data')//aatams:model_ref/aatams:device_model" origin="instance('inst_device_model')//aatams:device_model[@gml:id=instance('inst_subfeatures')/device_model_id]"/> The one difference is that the select1 nodeset XPath will not find any nodes on loading the form as the value "instance('inst_prp')/project_id" has not been set by the user from another select1. I'd really appreciate some assistance in getting this resolved as it is a final hurdle before my app. can be used in production. Thanks -- Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eMII.html -- Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eMII.html |
From: Stephen C. <Ste...@ut...> - 2009-08-12 02:21:27
|
Hello I am getting an error in Firefox with an XPath having an predicate containing an attribute with a namespace. This is the code in question: <xf:select1 bind="project_role_person" appearance="minimal" incremental="true()"> <xf:label>Person</xf:label> <xf:item> <xf:label/> <xf:value/> </xf:item> <xf:itemset nodeset="instance('inst_project_role_person')//aatams:project_role_person[aatams:project_ref/aatams:project/@gml:id=instance('inst_prp')/project_id]"> <xf:value ref="@gml:id"/> <xf:label ref="aatams:person_ref/aatams:person/aatams:name"/> </xf:itemset> <xf:help>This is a presently unhelpful help message</xf:help> </xf:select1> The problem sees to be the use of @gml:id, the error I see is: Error: XForms Error (10): Error parsing XPath expression: instance('inst_project_role_person')//aatams:project_role_person[aatams:project_ref/aatams:project/@gml:id=instance('inst_prp')/project_id] Elsewhere the same use of @gml:id is not causing a problem so I suspect it is an issue with the select1 implementation only. For example the code below works in my submit, which is doing exactly the same thing (I think). <xf:insert nodeset="instance('inst_data')//aatams:model_ref/aatams:device_model" origin="instance('inst_device_model')//aatams:device_model[@gml:id=instance('inst_subfeatures')/device_model_id]"/> The one difference is that the select1 nodeset XPath will not find any nodes on loading the form as the value "instance('inst_prp')/project_id" has not been set by the user from another select1. I'd really appreciate some assistance in getting this resolved as it is a final hurdle before my app. can be used in production. Thanks -- Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eMII.html |
From: Stephen C. <Ste...@ut...> - 2009-08-11 11:03:02
|
Hello, I would like to calculate the labels appearing in select1, this might be possible using the xf:bind 'calculate' attribute. However whilst the following example works, it only works if the caculated 'new_value' nodes are pre-existing in the instance. My problem is that if the source of the data is an external source then the calculated nodes cannot be inserted prior to the calculation and so perhaps they should be created automatically? Is there another way to handle this situation? <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:sample="http://www.agencexml.com/sample" > <head> <title>Demonstration of XForms Select1</title> <style type="text/css">body {font-family: Helvetica, sans-serif;}</style> <xf:model> <xf:instance> <sample:data> <sample:DayOfWeekCode/> </sample:data> </xf:instance> <xf:instance id="days"> <data xmlns=""> <item> <label>Monday</label> <value>mon</value> <new_value/> </item> <item> <label>Tuesday</label> <value>tue</value> <new_value/> </item> </data> </xf:instance> <xf:bind nodeset="instance('days')/item/new_value" calculate="translate(../value,'mtwfs','MTWFS')"/> </xf:model> </head> <body> <xf:select1 ref="sample:DayOfWeekCode" appearance="minimal" incremental="true"> <xf:label>Day of Week:</xf:label> <xf:itemset nodeset="instance('days')/item"> <xf:value ref="new_value"/> <xf:label ref="label"/> </xf:itemset> </xf:select1> <br/> Output: <xf:output ref="sample:DayOfWeekCode"/> </body> </html> -- Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eMII.html |
From: Stephen C. <Ste...@ut...> - 2009-08-11 05:10:56
|
Hello, Can anyone suggest a means to implement a maxLength constraint for XSLTforms. Is it possible in the same way as HTML inputs to set a "size" value on the xform input? I suspect not and that it should be done via a schema or a bind constraint but this does not seem to be supported in XSLTForms as yet. In XML Schema this would be done via a restriction of the xsd:string type. I guess I am wondering if it is possible to do it other than via a schema such as by a validation rule in a bind. Thanks -- Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eMII.html |
From: Stephen C. <Ste...@ut...> - 2009-08-07 01:07:11
|
Hello, In a select list the ability to compose a itemset label using an Xpath would be nice, this almost seems to work (typing an incorrect function name gives an error at least) but no result is presented. For example: <xf:itemset nodeset="instance('inst_people')//person"> <xf:label ref="concat('first_name',' ','second_name')"/> <xf:value ref="@id"/> </xf:itemset> In this case the item labels are composed of each persons first and second names concatenated with an intervening space. -- Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eMII.html |
From: COUTHURES A. <ala...@ag...> - 2009-07-31 09:39:26
|
I forgot to say that I have recently developed a small application for XBRL instances editing and rendering which is, of course, using XSLTForms. At this occasion, I designed the experimental formula extension allowing to enter, for example, "13+29" instead of "42" in numeric input fields. There are not yet many users for this application... but it might be shown to french financial students next year ! -Alain |
From: COUTHURES A. <ala...@ag...> - 2009-07-31 09:03:38
|
Hello Stephen, > I have a bit of confusion over the instance() function, in > XSLForms it returns the root node of the instance, if this is the > specification then that is fine but it seems a bit counter-intuitive as > '/' and '//' have different meanings in XPath. > The XForms 1.1 proposed recommendation says : "this function returns a node-set containing just the root element node (also called the document element node) of the referenced instance data" (AJAXForms was wrong returning the document node (/)...). > If this is correct behaviour then the example from > http://www.w3schools.com/xforms/xforms_functions.asp(as below) is wrong. > > **** > instance(string) > > An XForms Model can contain more than one instance. This function > returns the root node of the specified instance data > > <xforms:instance id="orderform"> > <firstName>John</firstName> > </xforms:instance> > > ref="instance('orderform')/firstName" > > This example returns a node-set that consists of the firstName element > node from the instance named "orderform" > > **** > > Also in the W3C proposed recommendation : For instance data corresponding to this XML: <xforms:instance xmlns="" id="orderform"> <orderForm> <shipTo> <firstName>John</firstName> </shipTo> </orderForm> </xforms:instance> The following expression selects the |firstName| node. Note that the |instance| function returns an element node, effectively replacing the leftmost location step from the path: ref="instance('orderform')/shipTo/firstName" > As a matter of general interest, do you know of many people who have > used XSLForms in production as yet? > Mark Logic has developed an "Application Builder" application delivered with Mark Logic Server 4.1. All around the world, people are downloading and testing XSLTForms but, because it's free, I don't know who is using it in production. XForms is yet an emerging technology to be used in the promising XRX architecture. EMC has now its own engine named Formula but it seems that IBM is not working anymore on Ubiquity XForms project and I would not be surprised if this project is abandoned soon... XSLTForms is still the most mature of its kind !! Regards, -Alain |
From: Stephen C. <Ste...@ut...> - 2009-07-31 08:46:08
|
Hello, I am still working away and developing my CRUD application with XSLForms, the only major issue so far is my forms won't work in IE 6.0. I think there is a javascript issue that I've not debugged as yet. However I have a bit of confusion over the instance() function, in XSLForms it returns the root node of the instance, if this is the specification then that is fine but it seems a bit counter-intuitive as '/' and '//' have different meanings in XPath. In the following example the first 2 'xf:output' elements work, the third is invalid, the fourth is valid. <?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?> <html menu="samples" xmlns="http://www.w3.org/1999/xhtml" xmlns:sample="http://www.agencexml.com/sample" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ajx="http://www.ajaxforms.net/2006/ajx"> <head> <xf:model> <xf:instance id="nums"> <sample:data> <sample:item>2</sample:item> <sample:item>5</sample:item> <sample:item>7</sample:item> </sample:data> </xf:instance> <xf:instance id="letters"> <sample:data>abcdefg</sample:data> </xf:instance> </xf:model> </head> <body> <h3>XPath Functions</h3> <div id="xformControl"> <span> <input type="checkbox" onclick="$('console').style.display = this.checked? 'block' : 'none';" checked="checked"/> Debug </span> </div> <xf:output value="instance('nums')/sample:item[last()]"> <xf:label>number <b>last</b>()</xf:label> </xf:output> <xf:output value="sum(instance('nums')/sample:item)"> <xf:label>number <b>sum a</b></xf:label> </xf:output> <xf:output value="sum(instance('nums')/sample:data/sample:item)"> <xf:label>number <b>sum b</b></xf:label> </xf:output> <xf:output value="instance('letters')"> <xf:label>letters</xf:label> </xf:output> <div id="console"/> </body> </html> If this is correct behaviour then the example from http://www.w3schools.com/xforms/xforms_functions.asp(as below) is wrong. **** instance(string) An XForms Model can contain more than one instance. This function returns the root node of the specified instance data <xforms:instance id="orderform"> <firstName>John</firstName> </xforms:instance> ref="instance('orderform')/firstName" This example returns a node-set that consists of the firstName element node from the instance named "orderform" **** As a matter of general interest, do you know of many people who have used XSLForms in production as yet? Thanks for your assistance. -- Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eMII.html |
From: COUTHURES A. <ala...@ag...> - 2009-07-31 07:55:55
|
Mathias, > I can't find a way to get at the document uri. Can you give me an example? > I tried with document-uri, but that's not there. fn:document-uri(node) is an XPath 2.0 function and its support could be added in XSLTForms... You can try to define it yourself in Javascript this way : <script type="text/javascript">//<![CDATA[ XPathCoreFunctions["fn:document-uri"]= new XPathFunction(false, XPathFunction.DEFAULT_NONE, false, function(node) { ... }); //]]></script> > Is the general idea of > > <xf:submission ... > > <xf:resource value=(substring-after(document-uri(instance(??), '?')) /> > </xf:submission> ^^^^^^^^^^^^^^^ ^^ > this is obviously only a first shot Which instance?? > Yes, this should look like this. Orbeon is the only XForms implementation supporting XPath 2.0 and it would be a good idea to analyze its behavior according to the node parameter. Depending whether the instance is embedded or loaded externally, the return value should be different... Regards, -Alain |
From: Mathias P. <Mat...@gm...> - 2009-07-30 16:39:19
|
[snip] > > This is implemented in XSLTForms and verified according to Test > 11.6.1.a of the W3C Test Suite. > > Regards, > > -Alain > Alain, I can't find a way to get at the document uri. Can you give me an example? I tried with document-uri, but that's not there. Anyway, I do not even know if I even think along the right lines, so I'll ask. Is the general idea of <xf:submission ... > <xf:resource value=(substring-after(document-uri(instance(??), '?')) /> </xf:submission> ^^^^^^^^^^^^^^^ ^^ this is obviously only a first shot Which instance?? correct? Any hints or tips? Thanks, Mathias |
From: Stephen C. <Ste...@ut...> - 2009-07-30 09:04:43
|
In regards to question 2 below regarding conditional select lists, the attached example "test conditional selection lists" from the **"XForms Tutorial and Cookbook" works with XSLForms. **-------- Original Message -------- Subject: Model from file reloading Date: Thu, 30 Jul 2009 09:42:43 +1000 From: Stephen Cameron <ste...@ut...> To: xsl...@li... I am trying to generate a CRUD application using XSLForms by transforming a database schema document generated by the Apache DDLUtils tool. I am interested if anyone else has tried something similar. There are a couple of things I would like to be able to do and would appreciate some help in knowing if they are, or could be, possible. (1) Reloading a model based on an external resource. This is useful if you have a select1 based on an external resource, if you want to add a new entry to the select list then the best way to do it (in my view) is to click on an "Add" button beside the select list and open a "New Resource XXX" page (or modal dialog), add the new entry, save it, then on closing the page get the select list to update from the server with the new entry included. This setup handles a foreign-key relation in the database schema. (2) Making a select list conditional on another select list. Usually this situation is usually two or more linked select lists, the top one is initially active and the bottom 'dependant' one inactive, by selecting an first entry in the top list you load the list in the bottom one and make it active, if you then change the entry in the top list you reload the bottom list with a new set of entries and remove its current selection. P.S. I am more than happy to provide my XSLT stylesheets for others to try or improve. Thanks. -- Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eMII.html -- Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eMII.html |
From: Stephen C. <Ste...@ut...> - 2009-07-29 23:43:01
|
I am trying to generate a CRUD application using XSLForms by transforming a database schema document generated by the Apache DDLUtils tool. I am interested if anyone else has tried something similar. There are a couple of things I would like to be able to do and would appreciate some help in knowing if they are, or could be, possible. (1) Reloading a model based on an external resource. This is useful if you have a select1 based on an external resource, if you want to add a new entry to the select list then the best way to do it (in my view) is to click on an "Add" button beside the select list and open a "New Resource XXX" page (or modal dialog), add the new entry, save it, then on closing the page get the select list to update from the server with the new entry included. This setup handles a foreign-key relation in the database schema. (2) Making a select list conditional on another select list. Usually this situation is usually two or more linked select lists, the top one is initially active and the bottom 'dependant' one inactive, by selecting an first entry in the top list you load the list in the bottom one and make it active, if you then change the entry in the top list you reload the bottom list with a new set of entries and remove its current selection. P.S. I am more than happy to provide my XSLT stylesheets for others to try or improve. Thanks. -- Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eMII.html |
From: COUTHURES A. <ala...@ag...> - 2009-07-29 15:18:36
|
Hi Mathias, > I want to dynamically load my instance data, using something like > > http://example.com/xforms/EditorTypeA?instance=id401 > > I searched, but there does not seem to be an xforms way to do this, so > what would be a portable javascript way be? > > Putting the parameter value in something like a currentDocument instance > on load and then use a replacing submission using that instance value on > xforms-ready?? > The XForms 1.1 proposed recommendation says : "The |resource| element allows the URI used for a submission to be dynamically calculated based on instance data." This is implemented in XSLTForms and verified according to Test 11.6.1.a of the W3C Test Suite. Regards, -Alain |
From: Mathias P. <Mat...@gm...> - 2009-07-29 15:05:47
|
I want to dynamically load my instance data, using something like http://example.com/xforms/EditorTypeA?instance=id401 I searched, but there does not seem to be an xforms way to do this, so what would be a portable javascript way be? Putting the parameter value in something like a currentDocument instance on load and then use a replacing submission using that instance value on xforms-ready?? If that's the way, this could probably be generalized to generate a simple xml instance from any query string (<querystring><paramX>valueX</paramX></querystring>), does something like that exist? Thx for any help, Mathias |
From: COUTHURES A. <ala...@ag...> - 2009-07-28 09:06:10
|
Hello Stephen, > I am experimenting with XSLTForms, I have developed an XForm and want to > POST XML to a servlet, however the XML received by the servlet has a > namespace change which I don't want. The new namespace is "pre1" and in > my form model it was "aatams". > "pre1" and "aatams" are just prefixes associated to namespaces and the serialized XML produced by XSLTForms is correct. The servlet shouldn't interpret the prefixes but the namespaces : an XML document is to be interpreted with an XML library, even regular expressions can't interpret XML easily... For human beings, it would be better if XSLTForms was reusing the same prefixes. This might be considered in a next version Thanks! -Alain |
From: Stephen C. <Ste...@ut...> - 2009-07-28 08:55:51
|
Hello, I am experimenting with XSLTForms, I have developed an XForm and want to POST XML to a servlet, however the XML received by the servlet has a namespace change which I don't want. The new namespace is "pre1" and in my form model it was "aatams". The xml received by the servlet is as follows: <Transaction xmlns="http://www.opengis.net/wfs" xmlns:pre1="http://www.imos.org.au/aatams" version="1.1.0" service="WFS"> <Insert> <pre1:Animal> <pre1:animal_id>1</pre1:animal_id> <pre1:classification_id>2</pre1:classification_id> <pre1:name>3</pre1:name> <pre1:display_level_id>4</pre1:display_level_id> <pre1:display_start_date>5</pre1:display_start_date> <pre1:comments>6</pre1:comments> </pre1:Animal> </Insert> </Transaction> The XFORM is as follows: <?xml version="1.0" encoding="UTF-8"?> <?xml-stylesheet href="xsltforms-beta/xsltforms/xsltforms.xsl" type="text/xsl"?><html xmlns:aatams="http://www.imos.org.au/aatams" xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events"> <head> <title>AATAMS Web Interface</title> <link href="aatams.css" rel="stylesheet" type="text/css"/> <xf:model> <xf:instance id="ANIMAL"> <wfs:Transaction xmlns:wfs="http://www.opengis.net/wfs" xmlns:gml="http://www.opengis.net/gml" xmlns:ogc="http://www.opengis.net/ogc" xmlns:aatams="http://www.imos.org.au/aatams" version="1.1.0" service="WFS"> <wfs:Insert> <aatams:Animal> <aatams:animal_id/> <aatams:classification_id/> <aatams:name/> <aatams:display_level_id/> <aatams:display_start_date/> <aatams:comments/> </aatams:Animal> </wfs:Insert> </wfs:Transaction> </xf:instance> <xf:submission id="s01" method="post" action="test" ref="instance('ANIMAL')"> <xf:message level="modeless" ev:event="xforms-submit-error">Submit error.</xf:message> </xf:submission> </xf:model> </head> <body> <div id="xformControl"> <span> <input type="checkbox" onclick="$('console').style.display = this.checked? 'block' : 'none';" checked="checked"/> Debug </span> </div> <xf:group ref="//aatams:Animal"> <fieldset xmlns=""> <legend>Animal</legend> <xf:input ref="aatams:animal_id"> <xf:label>Animal Id</xf:label> </xf:input> <xf:input ref="aatams:classification_id"> <xf:label>Classification Id</xf:label> </xf:input> <xf:input ref="aatams:name"> <xf:label>Name</xf:label> </xf:input> <xf:input ref="aatams:display_level_id"> <xf:label>Display Level Id</xf:label> </xf:input> <xf:input ref="aatams:display_start_date"> <xf:label>Display Start Date</xf:label> </xf:input> <xf:input ref="aatams:comments"> <xf:label>Comments</xf:label> </xf:input> </fieldset> </xf:group> <xf:submit submission="s01"> <xf:label>Save</xf:label> </xf:submit> <xf:trigger> <xf:label>Reset</xf:label> <xf:reset ev:event="DOMActivate"/> </xf:trigger> <br/> <div id="console"/> </body> </html> Thanks for your assistance. Regards Stephen Cameron Data Programmer Integrated Marine Observing System (IMOS) eMarine Information Infrastructure Project University of Tasmania, Private Bag 21, Hobart, TAS 7001, Australia Tel: +61 3 6226 8507 Fax: +61 3 6226 2997 Email: ste...@ut... URL: http://www.imos.org.au/eMII.html |
From: Jochen R. <j.r...@gm...> - 2009-07-22 14:02:58
|
Hi Alain, You probably know this already, I just send you this as a reminder that it get's not lost in the current development roadmap: I tested some examples of the XForms Wikibook against Mozilla-0.87-pre and XsltForms (2 days old SVN Snapshot ) and noticed that the "switch" behaviour is different: Example: <xf:*switch*> <xf:*case *id="1" selected="true">1</xf:case> <xf:*case *id="2" selected="true">2</xf:case> <xf:*case *id="3">3</xf:case> </xf:*switch*> Missing behaviour 1: If no select attribute is present, according to the Spec the first case should be activated: See: http://www.w3.org/MarkUp/Forms/specs/XForms1.1/index-all-20090604.html#ui-switch-module-> Point: 9.2.2 Missing behaviour 2: If multiple selected="true" attributes are present, the first one shall be activated. Here the 2 real-world examples from the Wikibook: http://en.wikibooks.org/wiki/XForms/Switch_and_Case http://en.wikibooks.org/wiki/XForms/Show-Hide_Controls Xsltforms Rocks !!! Regards Rusco |
From: COUTHURES A. <ala...@ag...> - 2009-07-20 12:16:50
|
Hello, I've been experiencing unwanted warnings from Internet Explorer such as "A script on this page is causing Internet Explorer to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?" due to XSLTForms processing a heavy XForms page. Here is a link explaining that a registry key has to be set, 5,000,000 statements being the default value : http://support.microsoft.com/kb/175500/en-us/ For 10,000,000 statements, the corresponding .reg is : [HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Styles] "MaxScriptStatements"=dword:00989680 Best regards, -Alain |
From: COUTHURES A. <ala...@ag...> - 2009-07-07 15:08:57
|
Hi Arnaud, > I'm using your processor for 2 days and I had a headhache to change > the input field style. Sorry about that... > I don't want modify all input only some. > > I put, just after <body> tag my css. > > And somewhere I've something like > .testClass input.xforms-value {width: 50px !important} > > It doesn't work because when page is generated all escape characters > are not present. My instruction became > .testClassinput.xforms-value {width: 50px !important} > no space between .testClass and input.xforms-values > > So what can I do? This is a known bug in the beta release. You can test this with the SVN work version at http://xsltforms.svn.sourceforge.net/viewvc/xsltforms/trunk/build/ Regards, -Alain |
From: Arnaud F. <arn...@gm...> - 2009-07-07 14:46:33
|
Thanks a lot... On Tue, Jul 7, 2009 at 4:44 PM, COUTHURES Alain < ala...@ag...> wrote: > Hi Arnaud, > >> I'm using your processor for 2 days and I had a headhache to change the >> input field style. >> > Sorry about that... > >> I don't want modify all input only some. >> >> I put, just after <body> tag my css. >> >> And somewhere I've something like >> .testClass input.xforms-value {width: 50px !important} >> >> It doesn't work because when page is generated all escape characters are >> not present. My instruction became >> .testClassinput.xforms-value {width: 50px !important} >> no space between .testClass and input.xforms-values >> >> So what can I do? >> > This is a known bug in the beta release. You can test this with the SVN > work version at > http://xsltforms.svn.sourceforge.net/viewvc/xsltforms/trunk/build/ > > Regards, > > -Alain > |