xsltforms-support Mailing List for XSLTForms (Page 36)
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: COUTHURES A. <ala...@fr...> - 2013-01-18 07:40:58
|
Hi Fatima, You need to use a dialog to be able to enter a new entry. Do you have seen some examples about dialogs already? You're talking about a database table: would you like to use the CSV support or are you converting the table into XML already? Did you try to write some form already? -Alain Le 18/01/2013 07:48, Fatima a écrit : > Hi All, > I have a select1 based on an external resource (database table). I want to be able to add a new entry to the select list by allowing the user to click an 'add new' button beside the select list, open a modal window, add the new entry, save it (to the database), then on closing the page the select list is updated with the new entry included. > Can anyone assist? > Thanks! > |
From: Fatima <ff...@gm...> - 2013-01-18 06:48:23
|
Hi All, I have a select1 based on an external resource (database table). I want to be able to add a new entry to the select list by allowing the user to click an 'add new' button beside the select list, open a modal window, add the new entry, save it (to the database), then on closing the page the select list is updated with the new entry included. Can anyone assist? Thanks! |
From: Alexander H. <al...@ho...> - 2013-01-17 22:42:09
|
Hi all, i've created a SSCCE to illustrate my problem: 'I would expect to get an alert if an empty string is entered as it does not meet the constraint.' It is available at http://phobos103.inf.uni-konstanz.de/xforms/constraint.xml Here is the source: <?xml version="1.0" encoding="iso-8859-1"?> <?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?> <?xsltforms-options debug="yes"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsd="http://www.w3.org/2001/XMLSchema" > <head> <title>Constraint</title> <style type="text/css"> body { font-family: sans-serif} label { display: inline-block; width: 16em; margin: 2em 2em; text-align: right } </style> <model xmlns="http://www.w3.org/2002/xforms"> <instance><data xmlns=""> <name/> </data> </instance> <bind nodeset="name" constraint="string-length(.) > 2"/> </model> </head> <body> <group xmlns="http://www.w3.org/2002/xforms"> <input ref="name" incremental='true'> <label>String with length > 2:</label> <alert>String must have more than two characters</alert> </input> </group> <hr/> <div> Constraint works, but I would expected to also see an alert if 'empty' string has been reached: <pre> input: '' -> no alert (why?) input: 'a' -> alert (OK) input: 'aa' -> alert (OK) input: 'aaa' -> no alert (OK) input: 'aa' -> alert (OK) input: 'a' -> alert (OK) input: '' -> no alert (why? constraint string-length(.) > 2 is not fulfilled) </pre> </div> </body> </html> Thanks, Alex > On Thu, Jan 17, 2013 at 3:57 AM, Alexander Holupirek <al...@ho...> wrote: > Hi list, > > I have a constraint problem. > > I use this bind: > > <xf:bind id="bind_xxx" nodeset="instance('inst_xxx')/xxx" required="true()" constraint="string-length(.) > 1"/> > > It works quite well in the following cases: > > * If I have an input of string-length(.) = 1, <xf:alert/> labels show up, good. > * As soon as string-length(.) is greater than one, they go away, good. > > Problem: > > * If I have string-length(.) = 0, no <xf:alert/> labels show up, which is unexpected. > > What is working as expected, is that I can not submit data (as it obviously does not fulfill the constraint). > But since no alert message is shown, I am not able to provide feedback about the missing value to the user. > > Do you have any clue, what is happening here? > > Thanks, > Alex |
From: Adam M. <Ada...@gm...> - 2013-01-17 07:33:46
|
Hello Alain and everyone :) I've experimented with doing form submission via JavaScript, and it's working well for me, *except* that I've made an edit to *xsltforms.js*. So I'd like to show my use case, and show the edit I made to the code, and then get some feedback. *1. MY USE CASE* For now, I find it most convenient to handle the submission in JavaScript. If submission fails, the server (in my application) will provide a JSON response containing an exception. I find it simplest (for now) to handle the submission request in JavaScript (with jQuery which is running in the parent document). Xsltforms provides for doing this, but I ran into a problem where it was appending url-encoded instance data to the URL, which wasn't appropriate in my use case. Here's the submission element from my form: <xf:submission id='submit' method='get' relevant='true' replace='instance' serialization='application/xml' action='javascript:submit(ser)' /> Here you can see the whole top level of my form, which includes the JavaScript for submission: http://pastebin.com/N2KCAT5t *2. MY CODE CHANGE* * * At revision 565, my change is to line 4105 of *xsltforms.js* (split onto multiple lines here)*:* if ((method === "get" || method === "delete") && this.serialization !== "none" *&& action.substr(0, 11) !== 'javascript:'* && action.substr(0, 9) !== "opener://" && action.substr(0, 8) !== "local://") { The effect of the change is to skip adding the url-encoded arguments, for a 'get' or 'delete' submission where the action is JavaScript. This way I can pass XML to my JavaScript submission function, and avoid having the action mangled to something like 'javascript:submit(ser)* ?var1=val1&var2=val2*'. *3. YOUR THOUGHTS?* * * Is my change OK to integrate into mainline source? Or maybe there's a better way to go? Thanks very much, /Adam |
From: Alexander H. <al...@ho...> - 2013-01-16 17:09:44
|
Hi list, I have a constraint problem. I use this bind: <xf:bind id="bind_xxx" nodeset="instance('inst_xxx')/xxx" required="true()" constraint="string-length(.) > 1"/> It works quite well in the following cases: * If I have an input of string-length(.) = 1, <xf:alert/> labels show up, good. * As soon as string-length(.) is greater than one, they go away, good. Problem: * If I have string-length(.) = 0, no <xf:alert/> labels show up, which is unexpected. What is working as expected, is that I can not submit data (as it obviously does not fulfill the constraint). But since no alert message is shown, I am not able to provide feedback about the missing value to the user. Do you have any clue, what is happening here? Thanks, Alex |
From: Dan M. <dan...@gm...> - 2013-01-16 00:23:30
|
This is a bit tricky but can be done with just a few lines of CSS. The way I have done it is to use FireBug to see what div has the {display:block} and the change it to be inline. Have you tried: .xforms-repeat-item {display:inline} http://en.wikibooks.org/wiki/XForms/Process_Step_Editor On Tue, Jan 15, 2013 at 5:58 PM, Ihe Onwuka <ihe...@gm...> wrote: > I have something like > > <repeat> > <input ref="description"><label etc ..../> > <repeat> > <output ref="yearlyfigure"/> > </repeat> > </repeat> > > Where there are several yearly figures for each description. > > I have inlined the yearly figures but they still print on a different > line to the description. > > Can anyone help with the CSS incantations to achieve my goal. > > thanks > > ihe > > ------------------------------------------------------------------------------ > Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS > and more. Get SQL Server skills now (including 2012) with LearnDevNow - > 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. > SALE $99.99 this month only - learn more at: > http://p.sf.net/sfu/learnmore_122512 > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support -- Dan McCreary NoSQL Evangelist office: (952) 931-9198 cell: (612) 986-1552 |
From: Ihe O. <ihe...@gm...> - 2013-01-15 23:58:34
|
I have something like <repeat> <input ref="description"><label etc ..../> <repeat> <output ref="yearlyfigure"/> </repeat> </repeat> Where there are several yearly figures for each description. I have inlined the yearly figures but they still print on a different line to the description. Can anyone help with the CSS incantations to achieve my goal. thanks ihe |
From: Ihe O. <ihe...@gm...> - 2013-01-12 23:13:55
|
If I wish to have a submission in which I replace the text in the document element of an instance why do I have to code <submission ... replace="text" targetref="instance('myInstance')/self::*" etc instead of <submission ... replace="text" targetref="instance('myInstance')" |
From: Elias M. <eli...@gm...> - 2013-01-10 16:20:50
|
Duuuh! You're right. I guess after looking at the same code for hours you don't see little things like that anymore :-( Thanks for catching. It works fine now. On Wed, Jan 9, 2013 at 4:58 PM, Stephen Cameron <ste...@gm...>wrote: > missing namespace in the @origin I think. @origin does not select anything > so its falling back to a default behaviour (I think). confusion! > > On Thu, Jan 10, 2013 at 8:32 AM, Elias Mazur <eli...@gm...> wrote: > >> Hi. >> >> I'm trying to use the "context" and "origin" attributes with xf:insert to >> insert blank records. I have an instance with the fields I need to display >> empty. The insert statement is: >> >> <xf:insert context="instance('sd-model_substance')" >> nodeset="hl7v3:component3" at="last()" position="after" >> origin="instance('sd-model_substance_empty')/component3"/> >> >> It does work but it seems to be inserting a row that is the same as the >> last on in the model used to capture the data, not the empty one referred >> to by the "origin" attribute. >> >> Any ideas? >> Thanks. >> Elias >> >> >> ------------------------------------------------------------------------------ >> Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery >> and much more. Keep your Java skills current with LearnJavaNow - >> 200+ hours of step-by-step video tutorials by Java experts. >> SALE $49.99 this month only -- learn more at: >> http://p.sf.net/sfu/learnmore_122612 >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support >> >> > > > ------------------------------------------------------------------------------ > Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery > and much more. Keep your Java skills current with LearnJavaNow - > 200+ hours of step-by-step video tutorials by Java experts. > SALE $49.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122612 > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > |
From: Stephen C. <ste...@gm...> - 2013-01-09 22:48:40
|
Hi Alain, I don't think that the boolean() function is working correctly. Here is my test case. <?xml-stylesheet href="xsltforms/xsltforms.xsl" type="text/xsl"?> <?xsltforms-options debug="no"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf=" http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:x=" http://www.xforms_editor.org" x:dummy="dummy"> <head> <link rel="stylesheet" type="text/css" href="xform.css" /> <xf:model id="model1"> <xf:instance id="inst1"> <data xmlns=""><bool>true</bool></data> </xf:instance> </xf:model> </head> <body> <xf:trigger> <xf:label>Toggle</xf:label> <xf:setvalue ev:event="DOMActivate" ref="bool" value="if(current()=true(),false(),true())"/> </xf:trigger> <br/> <xf:output value="bool"> <xf:label>bool:</xf:label> </xf:output> <br/> <xf:output value="if(boolean(bool),'IS TRUE','IS FALSE')"> <xf:label>boolean(bool):</xf:label> </xf:output> <xf:group ref="bool[.=true()]">IS TRUE </xf:group> <xf:group ref="bool[.!=true()]">IS FALSE </xf:group> <xf:group ref="bool[boolean(.)]">IS TRUE </xf:group> <xf:group ref="bool[not(boolean(.))]">IS FALSE </xf:group> </body> </html> |
From: Stephen C. <ste...@gm...> - 2013-01-09 21:58:59
|
missing namespace in the @origin I think. @origin does not select anything so its falling back to a default behaviour (I think). confusion! On Thu, Jan 10, 2013 at 8:32 AM, Elias Mazur <eli...@gm...> wrote: > Hi. > > I'm trying to use the "context" and "origin" attributes with xf:insert to > insert blank records. I have an instance with the fields I need to display > empty. The insert statement is: > > <xf:insert context="instance('sd-model_substance')" > nodeset="hl7v3:component3" at="last()" position="after" > origin="instance('sd-model_substance_empty')/component3"/> > > It does work but it seems to be inserting a row that is the same as the > last on in the model used to capture the data, not the empty one referred > to by the "origin" attribute. > > Any ideas? > Thanks. > Elias > > > ------------------------------------------------------------------------------ > Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery > and much more. Keep your Java skills current with LearnJavaNow - > 200+ hours of step-by-step video tutorials by Java experts. > SALE $49.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122612 > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > |
From: Stephen C. <ste...@gm...> - 2013-01-09 21:38:34
|
Hi, It should be a @nodeset attribute on the repeat not a @ref. On Thu, Jan 10, 2013 at 3:39 AM, Elias Mazur <eli...@gm...> wrote: > <?xml-stylesheet href="../xsltforms/xsltforms.xsl" type="text/xsl"?> > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf=" > http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema > "> > <head> > <title>Test XForms</title> > <xf:model> > <xf:instance id="my"> > <data xmlns=""> > <Elem1> > <id seq="1">1</id> > </Elem1> > <Elem1> > <id seq="2">2</id> > </Elem1> > </data> > </xf:instance> > <xf:bind nodeset="instance('my')/Elem1/id@seq" type="xsd:integer"/> > </xf:model> > </head> > <body> > <p>Testing....</p> > <xf:repeat id="rep" ref="instance('my')/Elem1"> > <xf:input id="seqnum" ref="./id@seq"> > <xf:label>Seq: </xf:label> > <xf:alert>Must be integer</xf:alert> > </xf:input> > <br/> > <xf:input id="theid" ref="./id"> > <xf:label>Id: </xf:label> > </xf:input> > <br/><br/> > </xf:repeat> > </body> > </html> > |
From: Elias M. <eli...@gm...> - 2013-01-09 21:32:11
|
Hi. I'm trying to use the "context" and "origin" attributes with xf:insert to insert blank records. I have an instance with the fields I need to display empty. The insert statement is: <xf:insert context="instance('sd-model_substance')" nodeset="hl7v3:component3" at="last()" position="after" origin="instance('sd-model_substance_empty')/component3"/> It does work but it seems to be inserting a row that is the same as the last on in the model used to capture the data, not the empty one referred to by the "origin" attribute. Any ideas? Thanks. Elias |
From: Benoit V. <bvi...@la...> - 2013-01-09 20:31:54
|
Hi Alain, For the new year I decided to update my r531 version of XSLTForms to the last r565. I use XSLTForms with eXist-dband do a server side transform with the Saxon XSLT engine. It seems to be an XML domain name problem in the module src/xslt/items/named-templates/group.xsl.xml : it produces html elements div, tbody, thead, ... with empty domain name instead of "http://www.w3.org/1999/xhtml". To run my application I had to replace lines 45, 78, 172 and 206 containing something like : <xsl:if test="$mainelt'g'">http://www.w3.org/2000/svg</xsl: if> with something like : <xsl:choose> <xsl:when test="$mainelt'g'">http://www.w3.org/2000/svg</ xsl: when> <xsl:otherwise>http://www.w3.org/1999/xhtml</xsl: otherwise> </xsl: choose> My forms seems to work fine now. What do you think about this fix? Best Wishes for 2013 Benoit |
From: Elias M. <eli...@gm...> - 2013-01-09 16:39:56
|
Hi Alain. I updated the XPath expression as you suggested and still doesn't seem to work. Interesting though, my application has been running fine without the "/" before the attribute. It works with it as well. Thanks. Elias On Tue, Jan 8, 2013 at 4:22 PM, Alain Couthures < ala...@ag...> wrote: > Hi Elias, > > XPath expressions for attributes are not correct: it should be "id/@seq" > instead of "id@seq" > > With these fixed XPath expressions, it sounds it works for me! > > -Alain > > Le 08/01/2013 22:08, Elias Mazur a écrit : > > Hi. > > I need to bind an attribute of an element to an integer. This element > is part of a repeat. Here is what the code looks like: > > ----------- > <?xml-stylesheet href="../xsltforms/xsltforms.xsl" type="text/xsl"?> > <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf=" > http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema > "> > <head> > <title>Test XForms</title> > <xf:model> > <xf:instance id="my"> > <data xmlns=""> > <Elem1> > <id seq="1">1</id> > </Elem1> > <Elem1> > <id seq="2">2</id> > </Elem1> > </data> > </xf:instance> > <xf:bind nodeset="instance('my')/Elem1/id@seq" type="xsd:integer"/> > </xf:model> > </head> > <body> > <p>Testing....</p> > <xf:repeat id="rep" ref="instance('my')/Elem1"> > <xf:input id="seqnum" ref="./id@seq"> > <xf:label>Seq: </xf:label> > <xf:alert>Must be integer</xf:alert> > </xf:input> > <br/> > <xf:input id="theid" ref="./id"> > <xf:label>Id: </xf:label> > </xf:input> > <br/><br/> > </xf:repeat> > </body> > </html> > ____ > > It works fine if there are no repeat and it's a single node. Doesn't > work like this with multiple nodes and the repeat. Any help is appreciated. > Thanks. > Elias > > > ------------------------------------------------------------------------------ > Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS > and more. Get SQL Server skills now (including 2012) with LearnDevNow - > 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. > SALE $99.99 this month only - learn more at:http://p.sf.net/sfu/learnmore_122512 > > > > _______________________________________________ > Xsltforms-support mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/xsltforms-support > > > |
From: Alain C. <ala...@ag...> - 2013-01-08 21:22:56
|
Hi Elias, XPath expressions for attributes are not correct: it should be "id/@seq" instead of "id@seq" With these fixed XPath expressions, it sounds it works for me! -Alain Le 08/01/2013 22:08, Elias Mazur a écrit : > Hi. > > I need to bind an attribute of an element to an integer. This element > is part of a repeat. Here is what the code looks like: > > ----------- > <?xml-stylesheet href="../xsltforms/xsltforms.xsl" type="text/xsl"?> > <html xmlns="http://www.w3.org/1999/xhtml" > xmlns:xf="http://www.w3.org/2002/xforms" > xmlns:xsd="http://www.w3.org/2001/XMLSchema"> > <head> > <title>Test XForms</title> > <xf:model> > <xf:instance id="my"> > <data xmlns=""> > <Elem1> > <id seq="1">1</id> > </Elem1> > <Elem1> > <id seq="2">2</id> > </Elem1> > </data> > </xf:instance> > <xf:bind nodeset="instance('my')/Elem1/id@seq" type="xsd:integer"/> > </xf:model> > </head> > <body> > <p>Testing....</p> > <xf:repeat id="rep" ref="instance('my')/Elem1"> > <xf:input id="seqnum" ref="./id@seq"> > <xf:label>Seq: </xf:label> > <xf:alert>Must be integer</xf:alert> > </xf:input> > <br/> > <xf:input id="theid" ref="./id"> > <xf:label>Id: </xf:label> > </xf:input> > <br/><br/> > </xf:repeat> > </body> > </html> > ____ > > It works fine if there are no repeat and it's a single node. Doesn't > work like this with multiple nodes and the repeat. Any help is > appreciated. > Thanks. > Elias > > > ------------------------------------------------------------------------------ > Master SQL Server Development, Administration, T-SQL, SSAS, SSIS, SSRS > and more. Get SQL Server skills now (including 2012) with LearnDevNow - > 200+ hours of step-by-step video tutorials by Microsoft MVPs and experts. > SALE $99.99 this month only - learn more at: > http://p.sf.net/sfu/learnmore_122512 > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Michael S. <ms...@ba...> - 2013-01-08 21:17:12
|
Hi Alain, No hurries! I am currently working on loading the editor on demand (and unloading instances that are currently not used); it's not perfect yet but I can send you my changes, it seems to work reasonably well. I'll try to wrap it up and send you a demo by Friday :-) Best and thanks! Am 08.01.2013 um 21:29 schrieb Alain Couthures <ala...@ag...>: > Hello Michael, > > This issue is due to DOM node cloning and tinyMCE doesn't support this. > > Apparently, duplicate ids are confusing it and XSLTForms is not changing ids before adding cloned nodes but just after. > > So, this requires a not so trivial change in XSLTForms. > > Are you in a hurry about this? > > -Alain > > Le 07/01/2013 10:27, Michael Seiferle a écrit : >> Dear list, >> >> I am playing around with tinyMCE and repeating elements, running into problems similar to: >>> http://sourceforge.net/mailarchive/forum.php?thread_name=50620AE1.5070900%40agencexml.com&forum_name=xsltforms-support >> but I could not find whether or not there was a solution to that problem. >> >> I prepared a running example at >>> https://gist.github.com/f3c8e4986d69217b4bee >> Once you click the add button, a new tinyMCE is inserted, but it is empty (i.e. contains an iframe with an empty body instead of the fields content) and can't be clicked on. >> So I assume it is not fully initialized in some way, yet I have no idea what actually goes wrong. >> >> Any ideas or pointers on how to solve this would be greatly appreciated :-) >> >> Best from Konstanz >> Michael >> >> >> ------------------------------------------------------------------------------ >> Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, >> MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current >> with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft >> MVPs and experts. SALE $99.99 this month only -- learn more at: >> http://p.sf.net/sfu/learnmore_122412 >> >> >> _______________________________________________ >> Xsltforms-support mailing list >> Xsl...@li... >> https://lists.sourceforge.net/lists/listinfo/xsltforms-support > |
From: Elias M. <eli...@gm...> - 2013-01-08 21:08:15
|
Hi. I need to bind an attribute of an element to an integer. This element is part of a repeat. Here is what the code looks like: ----------- <?xml-stylesheet href="../xsltforms/xsltforms.xsl" type="text/xsl"?> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf=" http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <head> <title>Test XForms</title> <xf:model> <xf:instance id="my"> <data xmlns=""> <Elem1> <id seq="1">1</id> </Elem1> <Elem1> <id seq="2">2</id> </Elem1> </data> </xf:instance> <xf:bind nodeset="instance('my')/Elem1/id@seq" type="xsd:integer"/> </xf:model> </head> <body> <p>Testing....</p> <xf:repeat id="rep" ref="instance('my')/Elem1"> <xf:input id="seqnum" ref="./id@seq"> <xf:label>Seq: </xf:label> <xf:alert>Must be integer</xf:alert> </xf:input> <br/> <xf:input id="theid" ref="./id"> <xf:label>Id: </xf:label> </xf:input> <br/><br/> </xf:repeat> </body> </html> ____ It works fine if there are no repeat and it's a single node. Doesn't work like this with multiple nodes and the repeat. Any help is appreciated. Thanks. Elias |
From: Alain C. <ala...@ag...> - 2013-01-08 20:29:29
|
Hello Michael, This issue is due to DOM node cloning and tinyMCE doesn't support this. Apparently, duplicate ids are confusing it and XSLTForms is not changing ids before adding cloned nodes but just after. So, this requires a not so trivial change in XSLTForms. Are you in a hurry about this? -Alain Le 07/01/2013 10:27, Michael Seiferle a écrit : > Dear list, > > I am playing around with tinyMCE and repeating elements, running into > problems similar to: >> http://sourceforge.net/mailarchive/forum.php?thread_name=50620AE1.5070900%40agencexml.com&forum_name=xsltforms-support >> <http://sourceforge.net/mailarchive/forum.php?thread_name=506...@ag...&forum_name=xsltforms-support> > but I could not find whether or not there was a solution to that problem. > > I prepared a running example at >> https://gist.github.com/f3c8e4986d69217b4bee > Once you click the add button, a new tinyMCE is inserted, but it is > empty (i.e. contains an iframe with an empty body instead of the > fields content) and can't be clicked on. > So I assume it is not fully initialized in some way, yet I have no > idea what actually goes wrong. > > Any ideas or pointers on how to solve this would be greatly > appreciated :-) > Best from Konstanz > Michael > > > ------------------------------------------------------------------------------ > Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS, > MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current > with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft > MVPs and experts. SALE $99.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122412 > > > _______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Michael S. <ms...@ba...> - 2013-01-07 09:50:21
|
Dear list, I am playing around with tinyMCE and repeating elements, running into problems similar to: > http://sourceforge.net/mailarchive/forum.php?thread_name=50620AE1.5070900%40agencexml.com&forum_name=xsltforms-support but I could not find whether or not there was a solution to that problem. I prepared a running example at > https://gist.github.com/f3c8e4986d69217b4bee Once you click the add button, a new tinyMCE is inserted, but it is empty (i.e. contains an iframe with an empty body instead of the fields content) and can't be clicked on. So I assume it is not fully initialized in some way, yet I have no idea what actually goes wrong. Any ideas or pointers on how to solve this would be greatly appreciated :-) Best from Konstanz Michael |
From: Alain C. <ala...@ag...> - 2013-01-01 21:03:26
|
Hello Matthew, > I have attempted to define a local function to do this: > > <script> > XPathCoreFunctions["http://www.w3.org/2005/xpath-functions ends-with"]= > new XPathFunction( > false, > XPathFunction.DEFAULT_NONE, > false, > function(x) { > return this.indexOf(x, this.length - x.length) !== -1; > } > ); > </script> I had to rename XSLTForms global Javascript objects to avoid name conflicts with frameworks: "XPathCoreFunctions" has been renamed "XsltForms_xpathCoreFunctions". When defining an XPath function for XSLTForms, parameters casting has to be considered so I rewrote this function and added it to the others (the namespace is not correct... but it's the default one...): "http://www.w3.org/2005/xpath-functions ends-with" : new XsltForms_xpathFunction(false, XsltForms_xpathFunction.DEFAULT_NONE, false, function(string, postfix) { if (arguments.length !== 2) { throw XsltForms_xpathFunctionExceptions.endsWithInvalidArgumentsNumber; } var s = XsltForms_globals.stringValue(string); var p = XsltForms_globals.stringValue(postfix); return s.substr(s.length - p.length, p.length) === p; } ), Defining your own Javascript function is another possibility (parameters are always passed as strings): <script> function js_ends_with(s,end) { return s.indexOf(end, s.length - end.length) !== -1; } </script> > I am using r559 build and Chrome. > XPath ends-with() function is now supported in r566. Thank you for your feedbacks! -Alain |
From: Jens Ø. P. <oe...@gm...> - 2012-12-31 09:42:01
|
Hi Stephen I am sure that your XXX Editor will make it big in the new year, evolving as it does by leaps and bounds. It would be interesting to see how it could be adapted to mixed contents. If one were to transform a TEI snippet like this <p>The scene opens at a party given by <name>Potiphar</name> in Venice. Venice, of course, was not <name>Potiphar's</name> home address; and I marvel a little at the change of <hi rend="it">venue</hi> when I think how much more harmony could have been got out of an Egyptian setting. But then I remind myself that the Russian ballet is nothing if not <hi rend="it">bizarre</hi>. The long banqueting-table recalls the canvases of <name rend="sc">Veronese</name>, but with discordant notes of the Orient and elsewhere. <name>Potiphar</name> himself, seated on a dais, has the air of an Assyrian bull. By his side <name>Mme. Potiphar</name> wears breeches ending above the knee, with white stockings and high clogs.</p> into something like this <p> <text:node>The scene opens at a party given by </text:node> <name> <text:node>Potiphar</text:node> </name> <text:node> in Venice. Venice, of course, was not </text:node> <name> <text:node>Potiphar's</text:node> </name> <text:node> home address; and I marvel a little at the change of </text:node> <hi rend="it"> <text:node>venue</text:node> </hi> <text:node> when I think how much more harmony could have been got out of an Egyptian setting. But then I remind myself that the Russian ballet is nothing if not </text:node> <hi rend="it"> <text:node>bizarre</text:node> </hi> <text:node>. The long banqueting-table recalls the canvases of </text:node> <name rend="sc"> <text:node>Veronese</text:node> </name> <text:node>, but with discordant notes of the Orient and elsewhere. </text:node> <name> <text:node>Potiphar</text:node> </name> <text:node> himself, seated on a dais, has the air of an Assyrian bull. By his side </text:node> <name> <text:node>Mme. Potiphar</text:node> </name> <text:node> wears breeches ending above the knee, with white stockings and high clogs.</text:node> </p> (and back), I guess this would be no problem? Best wishes for the new year, Jens On Dec 28, 2012, at 1:22 AM, Stephen Cameron <ste...@gm...> wrote: > Hello, > > You might be interested to see a prototype generic browser based XML Editor built using XSLTForms. > > Its dependant on the transform XPath function. > > http://forms.collinta.com.au/xml_edit.xml > > It has an issue in IE presently, I should be doing other things so will look at that later. > > All the best for 2013. > > Regards > Steve Cameron > ------------------------------------------------------------------------------ > Master HTML5, CSS3, ASP.NET, MVC, AJAX, Knockout.js, Web API and > much more. Get web development skills now with LearnDevNow - > 350+ hours of step-by-step video tutorials by Microsoft MVPs and experts. > SALE $99.99 this month only -- learn more at: > http://p.sf.net/sfu/learnmore_122812_______________________________________________ > Xsltforms-support mailing list > Xsl...@li... > https://lists.sourceforge.net/lists/listinfo/xsltforms-support |
From: Matthew G. <mj...@ca...> - 2012-12-31 01:07:22
|
Hi, I have a binding which makes use of the xpath-functions ends-with function: <xforms:bind nodeset="instance('record')/Name/@Sex" relevant="not(ends-with(instance('record')/Name/@Id, '.0'))"/> However, this does not appear to be supported in XSLTForms so I have attempted to define a local function to do this: <script> XPathCoreFunctions["http://www.w3.org/2005/xpath-functions ends-with"]= new XPathFunction( false, XPathFunction.DEFAULT_NONE, false, function(x) { return this.indexOf(x, this.length - x.length) !== -1; } ); </script> However, when I try and use this, I get XSLTForms Exception -------------------------- Error initializing : Function http://www.w3.org/2005/xpath-functions ends-with() not found Uncaught ReferenceError: XPathCoreFunctions is not defined (anonymous function) I am using r559 build and Chrome. I've tried using a dummy namespace or local namespace for the function but to no avail. Cheers, Matthew Graham |
From: Stephen C. <ste...@gm...> - 2012-12-30 12:33:52
|
Making progress, with the help of Mozilla developers the issue has been isolated to having a default zoom in my FF profile and that affecting the rendering when using a stylesheet processing instruction. I've got a high resolution screen on my laptop and thats why I see the issue there and not elsewhere (I zoomed in the past and that was saved as the default into my profile, without me being aware). :) ---------- Forwarded message ---------- From: Stephen Cameron <ste...@gm...> Date: Sun, Dec 30, 2012 at 12:53 PM Subject: rendering problem in Firefox, css body width:100% is ignored To: xsl...@li... Hello, I am hoping to resolve an issue that exists in Firefox when using XSLTForms. The problem is that if you set an absolute size and height of 100% (of the window size) this gets ignored when the page renders. Then if you resize the browser window it then takes this 'constraint' into consideration properly. I reported this bug to Mozilla but so far "WORKSFORME" is the response. So, now I have some test-cases that demonstrate the problem, I hope. I have a HTML page that works as expected in all browsers I have at hand, and the equivalent XML file with xslforms.xsl stylesheet processing instruction that works in all but FF. These are: http://forms.collinta.com.au/test1.html http://forms.collinta.com.au/test1.xml In test.html you will see a right hand scolling div with a pink 'menu' div in the top right of it. In test.xml initially you should not see any scroll-barsand the pink 'menu' div is off the page to the right (I assume). Then, when you resize the window the scroll-bars and menu div appear. If people could please test these in whatever browsers they use and report what they find I'd be thankful. I need details of browser make and version and OS details as well. Hopefully, by providing enough details Mozilla will take the issue seriously. Its important I feel in trying to make an application style interface using XSLTForms. Thanks and regards Steve Cameron |
From: Stephen C. <ste...@gm...> - 2012-12-30 01:53:26
|
Hello, I am hoping to resolve an issue that exists in Firefox when using XSLTForms. The problem is that if you set an absolute size and height of 100% (of the window size) this gets ignored when the page renders. Then if you resize the browser window it then takes this 'constraint' into consideration properly. I reported this bug to Mozilla but so far "WORKSFORME" is the response. So, now I have some test-cases that demonstrate the problem, I hope. I have a HTML page that works as expected in all browsers I have at hand, and the equivalent XML file with xslforms.xsl stylesheet processing instruction that works in all but FF. These are: http://forms.collinta.com.au/test1.html http://forms.collinta.com.au/test1.xml In test.html you will see a right hand scolling div with a pink 'menu' div in the top right of it. In test.xml initially you should not see any scroll-barsand the pink 'menu' div is off the page to the right (I assume). Then, when you resize the window the scroll-bars and menu div appear. If people could please test these in whatever browsers they use and report what they find I'd be thankful. I need details of browser make and version and OS details as well. Hopefully, by providing enough details Mozilla will take the issue seriously. Its important I feel in trying to make an application style interface using XSLTForms. Thanks and regards Steve Cameron |