What am I doing wrong?

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

What am I doing wrong?

José Antonio Sánchez
I'm starting evaluating OPS to develop a web application. My target is to be able to invoke a web service (a very special web service) with a raw SOAP message using XForms to fill some parameters, but I've found that nothing seems to work as expected.
I've made a small xhtml test:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
        xmlns:xforms="http://www.w3.org/2002/xforms">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
<xforms:model id="my-model">
        <xforms:instance id="my-instance">
                <name/>
        </xforms:instance>
        <xforms:submission id="submitModel"
                action="http://localhost:8081/muse/services/Ssh" method="post" />
</xforms:model>
</head>
<body>

<xforms:input ref="/envelope">
        <xforms:label>Valid</xforms:label>
</xforms:input>

<xforms:submit submission="submitModel">
        <xforms:label>Submit</xforms:label>
</xforms:submit>

</body>
</html>

Then I submit it to the XForms sandbox, but instead of seeing an input with a button, I get a red exclamation for less than a second and then dissapears leaving only the button.
What I'm I doing wrong? I'm using tomcat 5.5 with j2se 1.5.

Also, I've modified the hello world tutorial 3 example with the following:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xforms="http://www.w3.org/2002/xforms">
    <head>
        <title>Hello World XForms</title>
        <xforms:model>
            <xforms:instance>
                <myForm>
                   <first-name xmlns=""/>
                   <second-name xmlns=""/>
                </myForm>
            </xforms:instance>
        </xforms:model>
    </head>
    <body>
        <p>
            <xforms:group>
            <xforms:input ref="/myForm/first-name">
                   <xforms:label>Please enter your first name:</xforms:label>
                </xforms:input>
            <br/>
                <xforms:input ref="/myForm/second-name">
                        <xforms:label>And your second name:</xforms:label>
                </xforms:input>
            </xforms:group>
        </p>
        <p>
            <xforms:output value="if (normalize-space(/first-name) = '') then '' else concat('Hello, ', /first-name, '!')"/>
        </p>
    </body>
</html>

When I run it, I see the two labels for less then a second next to a red exclamation and then nothing.



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: What am I doing wrong?

Adrian Baker-2
At a guess I'd say the first issue is caused by the fact that the node your input is bound to (/envelope) doesn't exist in your instance data. The default behaviour for a control bound to a non-existent node is to display as non-relevant (ie hidden), which seems to match what you're seeing.

Secondly, be very careful about the default namespace in your instance document. In your first example, the <name> node is actually in the xhtml namespace, because this is the default namespace for your form. Usually you want to declare the null namespace at the top of the instance like so:

<xforms:instance id="my-model" xmlns="">

Same problem with your second example: <myForm> is in the html namespace, so the xpath in your ref would have to be somethine like /xhtml:myForm/first-name to work. So again, since it the ref isn't the finding the node, it's being made irrelevant (hidden). Add the null namespace declaration to the instance and see if this helps.

Adrian

[hidden email] wrote:
I'm starting evaluating OPS to develop a web application. My target is to be able to invoke a web service (a very special web service) with a raw SOAP message using XForms to fill some parameters, but I've found that nothing seems to work as expected.
I've made a small xhtml test:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:xforms="http://www.w3.org/2002/xforms">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
<xforms:model id="my-model">
	<xforms:instance id="my-instance">
		<name/>
	</xforms:instance>
	<xforms:submission id="submitModel"
		action="http://localhost:8081/muse/services/Ssh" method="post" />
</xforms:model>
</head>
<body>

<xforms:input ref="/envelope">
	<xforms:label>Valid</xforms:label>
</xforms:input>

<xforms:submit submission="submitModel">
	<xforms:label>Submit</xforms:label>
</xforms:submit>

</body>
</html>

Then I submit it to the XForms sandbox, but instead of seeing an input with a button, I get a red exclamation for less than a second and then dissapears leaving only the button.
What I'm I doing wrong? I'm using tomcat 5.5 with j2se 1.5.

Also, I've modified the hello world tutorial 3 example with the following:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xforms="http://www.w3.org/2002/xforms">
    <head>
        <title>Hello World XForms</title>
        <xforms:model>
            <xforms:instance>
		<myForm>
                   <first-name xmlns=""/>
		   <second-name xmlns=""/>
		</myForm>
            </xforms:instance>
        </xforms:model>
    </head>
    <body>
        <p>
            <xforms:group>
            	<xforms:input ref="/myForm/first-name">
		   <xforms:label>Please enter your first name:</xforms:label>
		</xforms:input>
	    <br/>
                <xforms:input ref="/myForm/second-name">
			<xforms:label>And your second name:</xforms:label>
		</xforms:input>
            </xforms:group>
        </p>
        <p>
            <xforms:output value="if (normalize-space(/first-name) = '') then '' else concat('Hello, ', /first-name, '!')"/>
        </p>
    </body>
</html>

When I run it, I see the two labels for less then a second next to a red exclamation and then nothing.

  

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: What am I doing wrong?

Marc.Benimeli
In reply to this post by José Antonio Sánchez
Following Adrain answear,
 
I attached a modified version of your Hello World sample.
 
Marc


De : Adrian Baker [mailto:[hidden email]]
Envoyé : mercredi 22 mars 2006 22:01
À : [hidden email]
Objet : Re: [ops-users] What am I doing wrong?

At a guess I'd say the first issue is caused by the fact that the node your input is bound to (/envelope) doesn't exist in your instance data. The default behaviour for a control bound to a non-existent node is to display as non-relevant (ie hidden), which seems to match what you're seeing.

Secondly, be very careful about the default namespace in your instance document. In your first example, the <name> node is actually in the xhtml namespace, because this is the default namespace for your form. Usually you want to declare the null namespace at the top of the instance like so:

<xforms:instance id="my-model" xmlns="">

Same problem with your second example: <myForm> is in the html namespace, so the xpath in your ref would have to be somethine like /xhtml:myForm/first-name to work. So again, since it the ref isn't the finding the node, it's being made irrelevant (hidden). Add the null namespace declaration to the instance and see if this helps.

Adrian

[hidden email] wrote:
I'm starting evaluating OPS to develop a web application. My target is to be able to invoke a web service (a very special web service) with a raw SOAP message using XForms to fill some parameters, but I've found that nothing seems to work as expected.
I've made a small xhtml test:

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:xforms="http://www.w3.org/2002/xforms">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Insert title here</title>
<xforms:model id="my-model">
	<xforms:instance id="my-instance">
		<name/>
	</xforms:instance>
	<xforms:submission id="submitModel"
		action="http://localhost:8081/muse/services/Ssh" method="post" />
</xforms:model>
</head>
<body>

<xforms:input ref="/envelope">
	<xforms:label>Valid</xforms:label>
</xforms:input>

<xforms:submit submission="submitModel">
	<xforms:label>Submit</xforms:label>
</xforms:submit>

</body>
</html>

Then I submit it to the XForms sandbox, but instead of seeing an input with a button, I get a red exclamation for less than a second and then dissapears leaving only the button.
What I'm I doing wrong? I'm using tomcat 5.5 with j2se 1.5.

Also, I've modified the hello world tutorial 3 example with the following:

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:xforms="http://www.w3.org/2002/xforms">
    <head>
        <title>Hello World XForms</title>
        <xforms:model>
            <xforms:instance>
		<myForm>
                   <first-name xmlns=""/>
		   <second-name xmlns=""/>
		</myForm>
            </xforms:instance>
        </xforms:model>
    </head>
    <body>
        <p>
            <xforms:group>
            	<xforms:input ref="/myForm/first-name">
		   <xforms:label>Please enter your first name:</xforms:label>
		</xforms:input>
	    <br/>
                <xforms:input ref="/myForm/second-name">
			<xforms:label>And your second name:</xforms:label>
		</xforms:input>
            </xforms:group>
        </p>
        <p>
            <xforms:output value="if (normalize-space(/first-name) = '') then '' else concat('Hello, ', /first-name, '!')"/>
        </p>
    </body>
</html>

When I run it, I see the two labels for less then a second next to a red exclamation and then nothing.

  

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

mytest.xhtml (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: What am I doing wrong?

José Antonio Sánchez
OK, your test works.
Now, why according to that
http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-model you can
do:

<xforms:instance id="credit-card-instance">
  <credit-card>
  <type/>
  <number/>
  <expiration-month/>
  <expiration-year/>
  <verification-code/>
  <valid/>
  </credit-card>
</xforms:instance>

and then reference it as:

<xforms:input ref="/credit-card/number"/>

It does not declare any namespace and it does not use the
instance('main') part (Although I tried it and it did not work).



On 3/23/06, [hidden email] <[hidden email]> wrote:

>
> Following Adrain answear,
>
> I attached a modified version of your Hello World sample.
>
> Marc
>
>  ________________________________
>  De : Adrian Baker [mailto:[hidden email]]
> Envoyé : mercredi 22 mars 2006 22:01
> À : [hidden email]
> Objet : Re: [ops-users] What am I doing wrong?
>
>
> At a guess I'd say the first issue is caused by the fact that the node your
> input is bound to (/envelope) doesn't exist in your instance data. The
> default behaviour for a control bound to a non-existent node is to display
> as non-relevant (ie hidden), which seems to match what you're seeing.
>
> Secondly, be very careful about the default namespace in your instance
> document. In your first example, the <name> node is actually in the xhtml
> namespace, because this is the default namespace for your form. Usually you
> want to declare the null namespace at the top of the instance like so:
>
> <xforms:instance id="my-model" xmlns="">
>
> Same problem with your second example: <myForm> is in the html namespace, so
> the xpath in your ref would have to be somethine like
> /xhtml:myForm/first-name to work. So again, since it the ref isn't the
> finding the node, it's being made irrelevant (hidden). Add the null
> namespace declaration to the instance and see if this helps.
>
> Adrian
>
> [hidden email] wrote:
> I'm starting evaluating OPS to develop a web application. My target is to be
> able to invoke a web service (a very special web service) with a raw SOAP
> message using XForms to fill some parameters, but I've found that nothing
> seems to work as expected.
> I've made a small xhtml test:
>
> <?xml version="1.0" encoding="UTF-8" ?>
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
>  xmlns:xforms="http://www.w3.org/2002/xforms">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> <title>Insert title here</title>
> <xforms:model id="my-model">
>  <xforms:instance id="my-instance">
>  <name/>
>  </xforms:instance>
>  <xforms:submission id="submitModel"
>  action="http://localhost:8081/muse/services/Ssh"
> method="post" />
> </xforms:model>
> </head>
> <body>
>
> <xforms:input ref="/envelope">
>  <xforms:label>Valid</xforms:label>
> </xforms:input>
>
> <xforms:submit submission="submitModel">
>  <xforms:label>Submit</xforms:label>
> </xforms:submit>
>
> </body>
> </html>
>
> Then I submit it to the XForms sandbox, but instead of seeing an input with
> a button, I get a red exclamation for less than a second and then dissapears
> leaving only the button.
> What I'm I doing wrong? I'm using tomcat 5.5 with j2se 1.5.
>
> Also, I've modified the hello world tutorial 3 example with the following:
>
> <html xmlns="http://www.w3.org/1999/xhtml"
>  xmlns:xforms="http://www.w3.org/2002/xforms">
>  <head>
>  <title>Hello World XForms</title>
>  <xforms:model>
>  <xforms:instance>
>  <myForm>
>  <first-name xmlns=""/>
>  <second-name xmlns=""/>
>  </myForm>
>  </xforms:instance>
>  </xforms:model>
>  </head>
>  <body>
>  <p>
>  <xforms:group>
>  <xforms:input ref="/myForm/first-name">
>  <xforms:label>Please enter your first name:</xforms:label>
>  </xforms:input>
>  <br/>
>  <xforms:input ref="/myForm/second-name">
>  <xforms:label>And your second name:</xforms:label>
>  </xforms:input>
>  </xforms:group>
>  </p>
>  <p>
>  <xforms:output value="if (normalize-space(/first-name) = '') then '' else
> concat('Hello, ', /first-name, '!')"/>
>  </p>
>  </body>
> </html>
>
> When I run it, I see the two labels for less then a second next to a red
> exclamation and then nothing.
>
>
> ________________________________
>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email]
> mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
>

--
Saludos.
José Antonio Sánchez



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: What am I doing wrong?

Ryan Puddephatt
You may well have fallen into the namespace trap, try declaring xmlns=""

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: José Antonio Sánchez [mailto:[hidden email]]
>Sent: 23 March 2006 09:53
>To: [hidden email]
>Subject: Re: [ops-users] What am I doing wrong?
>
>OK, your test works.
>Now, why according to that
>http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-model you can
>do:
>
><xforms:instance id="credit-card-instance">
>  <credit-card>
>  <type/>
>  <number/>
>  <expiration-month/>
>  <expiration-year/>
>  <verification-code/>
>  <valid/>
>  </credit-card>
></xforms:instance>
>
>and then reference it as:
>
><xforms:input ref="/credit-card/number"/>
>
>It does not declare any namespace and it does not use the
>instance('main') part (Although I tried it and it did not work).
>
>
>
>On 3/23/06, [hidden email] <[hidden email]> wrote:
>>
>> Following Adrain answear,
>>
>> I attached a modified version of your Hello World sample.
>>
>> Marc
>>
>>  ________________________________
>>  De : Adrian Baker [mailto:[hidden email]]
>> Envoyé : mercredi 22 mars 2006 22:01
>> À : [hidden email]
>> Objet : Re: [ops-users] What am I doing wrong?
>>
>>
>> At a guess I'd say the first issue is caused by the fact that the node
>your
>> input is bound to (/envelope) doesn't exist in your instance data. The
>> default behaviour for a control bound to a non-existent node is to
>display
>> as non-relevant (ie hidden), which seems to match what you're seeing.
>>
>> Secondly, be very careful about the default namespace in your instance
>> document. In your first example, the <name> node is actually in the xhtml
>> namespace, because this is the default namespace for your form. Usually
>you
>> want to declare the null namespace at the top of the instance like so:
>>
>> <xforms:instance id="my-model" xmlns="">
>>
>> Same problem with your second example: <myForm> is in the html namespace,
>so
>> the xpath in your ref would have to be somethine like
>> /xhtml:myForm/first-name to work. So again, since it the ref isn't the
>> finding the node, it's being made irrelevant (hidden). Add the null
>> namespace declaration to the instance and see if this helps.
>>
>> Adrian
>>
>> [hidden email] wrote:
>> I'm starting evaluating OPS to develop a web application. My target is to
>be
>> able to invoke a web service (a very special web service) with a raw SOAP
>> message using XForms to fill some parameters, but I've found that nothing
>> seems to work as expected.
>> I've made a small xhtml test:
>>
>> <?xml version="1.0" encoding="UTF-8" ?>
>> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>> <html xmlns="http://www.w3.org/1999/xhtml"
>>  xmlns:xforms="http://www.w3.org/2002/xforms">
>> <head>
>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
>> <title>Insert title here</title>
>> <xforms:model id="my-model">
>>  <xforms:instance id="my-instance">
>>  <name/>
>>  </xforms:instance>
>>  <xforms:submission id="submitModel"
>>  action="http://localhost:8081/muse/services/Ssh"
>> method="post" />
>> </xforms:model>
>> </head>
>> <body>
>>
>> <xforms:input ref="/envelope">
>>  <xforms:label>Valid</xforms:label>
>> </xforms:input>
>>
>> <xforms:submit submission="submitModel">
>>  <xforms:label>Submit</xforms:label>
>> </xforms:submit>
>>
>> </body>
>> </html>
>>
>> Then I submit it to the XForms sandbox, but instead of seeing an input
>with
>> a button, I get a red exclamation for less than a second and then
>dissapears
>> leaving only the button.
>> What I'm I doing wrong? I'm using tomcat 5.5 with j2se 1.5.
>>
>> Also, I've modified the hello world tutorial 3 example with the
>following:
>>
>> <html xmlns="http://www.w3.org/1999/xhtml"
>>  xmlns:xforms="http://www.w3.org/2002/xforms">
>>  <head>
>>  <title>Hello World XForms</title>
>>  <xforms:model>
>>  <xforms:instance>
>>  <myForm>
>>  <first-name xmlns=""/>
>>  <second-name xmlns=""/>
>>  </myForm>
>>  </xforms:instance>
>>  </xforms:model>
>>  </head>
>>  <body>
>>  <p>
>>  <xforms:group>
>>  <xforms:input ref="/myForm/first-name">
>>  <xforms:label>Please enter your first name:</xforms:label>
>>  </xforms:input>
>>  <br/>
>>  <xforms:input ref="/myForm/second-name">
>>  <xforms:label>And your second name:</xforms:label>
>>  </xforms:input>
>>  </xforms:group>
>>  </p>
>>  <p>
>>  <xforms:output value="if (normalize-space(/first-name) = '') then ''
>else
>> concat('Hello, ', /first-name, '!')"/>
>>  </p>
>>  </body>
>> </html>
>>
>> When I run it, I see the two labels for less then a second next to a red
>> exclamation and then nothing.
>>
>>
>> ________________________________
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email]
>> mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email]
>> mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>>
>>
>
>
>--
>Saludos.
>José Antonio Sánchez




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: What am I doing wrong?

Marc.Benimeli
In reply to this post by José Antonio Sánchez
José ,

Try the modified version.

If you are using only one instance, you don't have to give an id parameter to this instance.

The ref attribute of the input control have to point to an instance node.

But be carefull with the notation :

With :
<xforms:instance id="credit-card-instance">
        <credit-card>
                <type/>
                <number/>
                <expiration-month/>
                <expiration-year/>
                <verification-code/>
                <valid/>
        </credit-card>
</xforms:instance>

You can write :

<xforms:input ref="/credit-card/number"/>

Or

<xforms:input ref="instance('credit-card-instance')/number"/>
Here instance('credit-card-instance') point under the root(credit-card) of the XML instance.

Marc

-----Message d'origine-----
De : José Antonio Sánchez [mailto:[hidden email]]
Envoyé : jeudi 23 mars 2006 10:53
À : [hidden email]
Objet : Re: [ops-users] What am I doing wrong?

OK, your test works.
Now, why according to that
http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-model you can
do:

<xforms:instance id="credit-card-instance">
  <credit-card>
  <type/>
  <number/>
  <expiration-month/>
  <expiration-year/>
  <verification-code/>
  <valid/>
  </credit-card>
</xforms:instance>

and then reference it as:

<xforms:input ref="/credit-card/number"/>

It does not declare any namespace and it does not use the
instance('main') part (Although I tried it and it did not work).



On 3/23/06, [hidden email] <[hidden email]> wrote:

>
> Following Adrain answear,
>
> I attached a modified version of your Hello World sample.
>
> Marc
>
>  ________________________________
>  De : Adrian Baker [mailto:[hidden email]] Envoyé : mercredi
> 22 mars 2006 22:01 À : [hidden email] Objet : Re: [ops-users]
> What am I doing wrong?
>
>
> At a guess I'd say the first issue is caused by the fact that the node
> your input is bound to (/envelope) doesn't exist in your instance
> data. The default behaviour for a control bound to a non-existent node
> is to display as non-relevant (ie hidden), which seems to match what you're seeing.
>
> Secondly, be very careful about the default namespace in your instance
> document. In your first example, the <name> node is actually in the
> xhtml namespace, because this is the default namespace for your form.
> Usually you want to declare the null namespace at the top of the instance like so:
>
> <xforms:instance id="my-model" xmlns="">
>
> Same problem with your second example: <myForm> is in the html
> namespace, so the xpath in your ref would have to be somethine like
> /xhtml:myForm/first-name to work. So again, since it the ref isn't the
> finding the node, it's being made irrelevant (hidden). Add the null
> namespace declaration to the instance and see if this helps.
>
> Adrian
>
> [hidden email] wrote:
> I'm starting evaluating OPS to develop a web application. My target is
> to be able to invoke a web service (a very special web service) with a
> raw SOAP message using XForms to fill some parameters, but I've found
> that nothing seems to work as expected.
> I've made a small xhtml test:
>
> <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC
> "-//W3C//DTD XHTML 1.0 Transitional//EN"
> "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"
>  xmlns:xforms="http://www.w3.org/2002/xforms">
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> <title>Insert title here</title> <xforms:model id="my-model">  
> <xforms:instance id="my-instance">  <name/>  </xforms:instance>  
> <xforms:submission id="submitModel"
>  action="http://localhost:8081/muse/services/Ssh"
> method="post" />
> </xforms:model>
> </head>
> <body>
>
> <xforms:input ref="/envelope">
>  <xforms:label>Valid</xforms:label>
> </xforms:input>
>
> <xforms:submit submission="submitModel">  
> <xforms:label>Submit</xforms:label>
> </xforms:submit>
>
> </body>
> </html>
>
> Then I submit it to the XForms sandbox, but instead of seeing an input
> with a button, I get a red exclamation for less than a second and then
> dissapears leaving only the button.
> What I'm I doing wrong? I'm using tomcat 5.5 with j2se 1.5.
>
> Also, I've modified the hello world tutorial 3 example with the following:
>
> <html xmlns="http://www.w3.org/1999/xhtml"
>  xmlns:xforms="http://www.w3.org/2002/xforms">
>  <head>
>  <title>Hello World XForms</title>
>  <xforms:model>
>  <xforms:instance>
>  <myForm>
>  <first-name xmlns=""/>
>  <second-name xmlns=""/>
>  </myForm>
>  </xforms:instance>
>  </xforms:model>
>  </head>
>  <body>
>  <p>
>  <xforms:group>
>  <xforms:input ref="/myForm/first-name">  <xforms:label>Please enter
> your first name:</xforms:label>  </xforms:input>  <br/>  <xforms:input
> ref="/myForm/second-name">  <xforms:label>And your second
> name:</xforms:label>  </xforms:input>  </xforms:group>  </p>  <p>  
> <xforms:output value="if (normalize-space(/first-name) = '') then ''
> else concat('Hello, ', /first-name, '!')"/>  </p>  </body> </html>
>
> When I run it, I see the two labels for less then a second next to a
> red exclamation and then nothing.
>
>
> ________________________________
>
>
> --
> You receive this message as a subscriber of the
> [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>
>
>
>
> --
> You receive this message as a subscriber of the
> [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page:
> http://www.objectweb.org/wws
>
>
>
>

--
Saludos.
José Antonio Sánchez



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws

mytest.xhtml (1K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: What am I doing wrong?

José Antonio Sánchez
Sorry to bother but I don't understand many things:
So, if I have only one instance, I can ommit the model tag and then I
can reference it as /credit-card/number, for example. Can I put
submissions without model? I've tried and it gives me an error.
Also, I've made another test, but again, it doesn't work:

<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
        xmlns:xforms="http://www.w3.org/2002/xforms">
<xhtml:head>
<xhtml:title>Insert title here</xhtml:title>
<xforms:model>
        <xforms:instance id="main">
                <main>
                        <credit-card>
                                <type xmlns=""/>
                                <number xmlns="">3</number>
                                <expiration-month xmlns=""/>
                                <expiration-year xmlns=""/>
                                <verification-code xmlns=""/>
                                <valid xmlns="">false</valid>
                        </credit-card>
                </main>
        </xforms:instance>
        <xforms:submission id="submit_model_Envelope"
                action="http://adapt05.ls.fi.upm.es:8081/muse/services/Ssh" method="post" />
</xforms:model>
</xhtml:head>
<xhtml:body>
<xhtml:p>
        <xforms:group>
                <xforms:input ref="instance('main')/credit-card/number">
                        <xforms:label>Number</xforms:label>
                </xforms:input>
                <xforms:submit submission="submit_model_Envelope">
                        <xforms:label>Submit</xforms:label>
                </xforms:submit>
        </xforms:group>
</xhtml:p>
</xhtml:body>
</xhtml:html>

Could you tell me what's the problem with this?

On 3/23/06, [hidden email] <[hidden email]> wrote:

> José ,
>
> Try the modified version.
>
> If you are using only one instance, you don't have to give an id parameter to this instance.
>
> The ref attribute of the input control have to point to an instance node.
>
> But be carefull with the notation :
>
> With :
> <xforms:instance id="credit-card-instance">
>         <credit-card>
>                 <type/>
>                 <number/>
>                 <expiration-month/>
>                 <expiration-year/>
>                 <verification-code/>
>                 <valid/>
>         </credit-card>
> </xforms:instance>
>
> You can write :
>
> <xforms:input ref="/credit-card/number"/>
>
> Or
>
> <xforms:input ref="instance('credit-card-instance')/number"/>
> Here instance('credit-card-instance') point under the root(credit-card) of the XML instance.
>
> Marc
>
> -----Message d'origine-----
> De : José Antonio Sánchez [mailto:[hidden email]]
> Envoyé : jeudi 23 mars 2006 10:53
> À : [hidden email]
> Objet : Re: [ops-users] What am I doing wrong?
>
> OK, your test works.
> Now, why according to that
> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-model you can
> do:
>
> <xforms:instance id="credit-card-instance">
>   <credit-card>
>   <type/>
>   <number/>
>   <expiration-month/>
>   <expiration-year/>
>   <verification-code/>
>   <valid/>
>   </credit-card>
> </xforms:instance>
>
> and then reference it as:
>
> <xforms:input ref="/credit-card/number"/>
>
> It does not declare any namespace and it does not use the
> instance('main') part (Although I tried it and it did not work).
>
>
>
> On 3/23/06, [hidden email] <[hidden email]> wrote:
> >
> > Following Adrain answear,
> >
> > I attached a modified version of your Hello World sample.
> >
> > Marc
> >
> >  ________________________________
> >  De : Adrian Baker [mailto:[hidden email]] Envoyé : mercredi
> > 22 mars 2006 22:01 À : [hidden email] Objet : Re: [ops-users]
> > What am I doing wrong?
> >
> >
> > At a guess I'd say the first issue is caused by the fact that the node
> > your input is bound to (/envelope) doesn't exist in your instance
> > data. The default behaviour for a control bound to a non-existent node
> > is to display as non-relevant (ie hidden), which seems to match what you're seeing.
> >
> > Secondly, be very careful about the default namespace in your instance
> > document. In your first example, the <name> node is actually in the
> > xhtml namespace, because this is the default namespace for your form.
> > Usually you want to declare the null namespace at the top of the instance like so:
> >
> > <xforms:instance id="my-model" xmlns="">
> >
> > Same problem with your second example: <myForm> is in the html
> > namespace, so the xpath in your ref would have to be somethine like
> > /xhtml:myForm/first-name to work. So again, since it the ref isn't the
> > finding the node, it's being made irrelevant (hidden). Add the null
> > namespace declaration to the instance and see if this helps.
> >
> > Adrian
> >
> > [hidden email] wrote:
> > I'm starting evaluating OPS to develop a web application. My target is
> > to be able to invoke a web service (a very special web service) with a
> > raw SOAP message using XForms to fill some parameters, but I've found
> > that nothing seems to work as expected.
> > I've made a small xhtml test:
> >
> > <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC
> > "-//W3C//DTD XHTML 1.0 Transitional//EN"
> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> > <html xmlns="http://www.w3.org/1999/xhtml"
> >  xmlns:xforms="http://www.w3.org/2002/xforms">
> > <head>
> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> > <title>Insert title here</title> <xforms:model id="my-model">
> > <xforms:instance id="my-instance">  <name/>  </xforms:instance>
> > <xforms:submission id="submitModel"
> >  action="http://localhost:8081/muse/services/Ssh"
> > method="post" />
> > </xforms:model>
> > </head>
> > <body>
> >
> > <xforms:input ref="/envelope">
> >  <xforms:label>Valid</xforms:label>
> > </xforms:input>
> >
> > <xforms:submit submission="submitModel">
> > <xforms:label>Submit</xforms:label>
> > </xforms:submit>
> >
> > </body>
> > </html>
> >
> > Then I submit it to the XForms sandbox, but instead of seeing an input
> > with a button, I get a red exclamation for less than a second and then
> > dissapears leaving only the button.
> > What I'm I doing wrong? I'm using tomcat 5.5 with j2se 1.5.
> >
> > Also, I've modified the hello world tutorial 3 example with the following:
> >
> > <html xmlns="http://www.w3.org/1999/xhtml"
> >  xmlns:xforms="http://www.w3.org/2002/xforms">
> >  <head>
> >  <title>Hello World XForms</title>
> >  <xforms:model>
> >  <xforms:instance>
> >  <myForm>
> >  <first-name xmlns=""/>
> >  <second-name xmlns=""/>
> >  </myForm>
> >  </xforms:instance>
> >  </xforms:model>
> >  </head>
> >  <body>
> >  <p>
> >  <xforms:group>
> >  <xforms:input ref="/myForm/first-name">  <xforms:label>Please enter
> > your first name:</xforms:label>  </xforms:input>  <br/>  <xforms:input
> > ref="/myForm/second-name">  <xforms:label>And your second
> > name:</xforms:label>  </xforms:input>  </xforms:group>  </p>  <p>
> > <xforms:output value="if (normalize-space(/first-name) = '') then ''
> > else concat('Hello, ', /first-name, '!')"/>  </p>  </body> </html>
> >
> > When I run it, I see the two labels for less then a second next to a
> > red exclamation and then nothing.
> >
> >
> > ________________________________
> >
> >
> > --
> > You receive this message as a subscriber of the
> > [hidden email] mailing list.
> > To unsubscribe: mailto:[hidden email]
> > For general help: mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page:
> > http://www.objectweb.org/wws
> >
> >
> >
> >
> > --
> > You receive this message as a subscriber of the
> > [hidden email] mailing list.
> > To unsubscribe: mailto:[hidden email]
> > For general help: mailto:[hidden email]?subject=help
> > ObjectWeb mailing lists service home page:
> > http://www.objectweb.org/wws
> >
> >
> >
> >
>
>
> --
> Saludos.
> José Antonio Sánchez
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>
>

--
Saludos.
José Antonio Sánchez



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: What am I doing wrong?

Ryan Puddephatt
Jose,
        You should have ids on both the model and instance! Also the empty
namespace need to be on the xforms:instance tag only! All the child elements
will then take that namespace by default. The submission doesn't work
because it has not got a ref attribute, this should be "instance('main')"
also it has not replace. You should look at the docs for more info, but for
now put replace="all" and this will reload the page or forward on to another
one. Also you have a full http path in the submission, why? You can put the
action as part of the page-flow, then OPS will handle it all!

Hope this helps

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: José Antonio Sánchez [mailto:[hidden email]]
>Sent: 23 March 2006 12:17
>To: [hidden email]
>Subject: Re: [ops-users] What am I doing wrong?
>
>Sorry to bother but I don't understand many things:
>So, if I have only one instance, I can ommit the model tag and then I
>can reference it as /credit-card/number, for example. Can I put
>submissions without model? I've tried and it gives me an error.
>Also, I've made another test, but again, it doesn't work:
>
><xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
> xmlns:xforms="http://www.w3.org/2002/xforms">
><xhtml:head>
><xhtml:title>Insert title here</xhtml:title>
><xforms:model>
> <xforms:instance id="main">
> <main>
> <credit-card>
> <type xmlns=""/>
> <number xmlns="">3</number>
> <expiration-month xmlns=""/>
> <expiration-year xmlns=""/>
> <verification-code xmlns=""/>
> <valid xmlns="">false</valid>
> </credit-card>
> </main>
> </xforms:instance>
> <xforms:submission id="submit_model_Envelope"
> action="http://adapt05.ls.fi.upm.es:8081/muse/services/Ssh"
>method="post" />
></xforms:model>
></xhtml:head>
><xhtml:body>
><xhtml:p>
> <xforms:group>
> <xforms:input ref="instance('main')/credit-card/number">
> <xforms:label>Number</xforms:label>
> </xforms:input>
> <xforms:submit submission="submit_model_Envelope">
> <xforms:label>Submit</xforms:label>
> </xforms:submit>
> </xforms:group>
></xhtml:p>
></xhtml:body>
></xhtml:html>
>
>Could you tell me what's the problem with this?
>
>On 3/23/06, [hidden email] <[hidden email]> wrote:
>> José ,
>>
>> Try the modified version.
>>
>> If you are using only one instance, you don't have to give an id
>parameter to this instance.
>>
>> The ref attribute of the input control have to point to an instance node.
>>
>> But be carefull with the notation :
>>
>> With :
>> <xforms:instance id="credit-card-instance">
>>         <credit-card>
>>                 <type/>
>>                 <number/>
>>                 <expiration-month/>
>>                 <expiration-year/>
>>                 <verification-code/>
>>                 <valid/>
>>         </credit-card>
>> </xforms:instance>
>>
>> You can write :
>>
>> <xforms:input ref="/credit-card/number"/>
>>
>> Or
>>
>> <xforms:input ref="instance('credit-card-instance')/number"/>
>> Here instance('credit-card-instance') point under the root(credit-card)
>of the XML instance.
>>
>> Marc
>>
>> -----Message d'origine-----
>> De : José Antonio Sánchez [mailto:[hidden email]]
>> Envoyé : jeudi 23 mars 2006 10:53
>> À : [hidden email]
>> Objet : Re: [ops-users] What am I doing wrong?
>>
>> OK, your test works.
>> Now, why according to that
>> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-model you can
>> do:
>>
>> <xforms:instance id="credit-card-instance">
>>   <credit-card>
>>   <type/>
>>   <number/>
>>   <expiration-month/>
>>   <expiration-year/>
>>   <verification-code/>
>>   <valid/>
>>   </credit-card>
>> </xforms:instance>
>>
>> and then reference it as:
>>
>> <xforms:input ref="/credit-card/number"/>
>>
>> It does not declare any namespace and it does not use the
>> instance('main') part (Although I tried it and it did not work).
>>
>>
>>
>> On 3/23/06, [hidden email] <[hidden email]> wrote:
>> >
>> > Following Adrain answear,
>> >
>> > I attached a modified version of your Hello World sample.
>> >
>> > Marc
>> >
>> >  ________________________________
>> >  De : Adrian Baker [mailto:[hidden email]] Envoyé : mercredi
>> > 22 mars 2006 22:01 À : [hidden email] Objet : Re: [ops-users]
>> > What am I doing wrong?
>> >
>> >
>> > At a guess I'd say the first issue is caused by the fact that the node
>> > your input is bound to (/envelope) doesn't exist in your instance
>> > data. The default behaviour for a control bound to a non-existent node
>> > is to display as non-relevant (ie hidden), which seems to match what
>you're seeing.
>> >
>> > Secondly, be very careful about the default namespace in your instance
>> > document. In your first example, the <name> node is actually in the
>> > xhtml namespace, because this is the default namespace for your form.
>> > Usually you want to declare the null namespace at the top of the
>instance like so:
>> >
>> > <xforms:instance id="my-model" xmlns="">
>> >
>> > Same problem with your second example: <myForm> is in the html
>> > namespace, so the xpath in your ref would have to be somethine like
>> > /xhtml:myForm/first-name to work. So again, since it the ref isn't the
>> > finding the node, it's being made irrelevant (hidden). Add the null
>> > namespace declaration to the instance and see if this helps.
>> >
>> > Adrian
>> >
>> > [hidden email] wrote:
>> > I'm starting evaluating OPS to develop a web application. My target is
>> > to be able to invoke a web service (a very special web service) with a
>> > raw SOAP message using XForms to fill some parameters, but I've found
>> > that nothing seems to work as expected.
>> > I've made a small xhtml test:
>> >
>> > <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC
>> > "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>> > <html xmlns="http://www.w3.org/1999/xhtml"
>> >  xmlns:xforms="http://www.w3.org/2002/xforms">
>> > <head>
>> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
>> > <title>Insert title here</title> <xforms:model id="my-model">
>> > <xforms:instance id="my-instance">  <name/>  </xforms:instance>
>> > <xforms:submission id="submitModel"
>> >  action="http://localhost:8081/muse/services/Ssh"
>> > method="post" />
>> > </xforms:model>
>> > </head>
>> > <body>
>> >
>> > <xforms:input ref="/envelope">
>> >  <xforms:label>Valid</xforms:label>
>> > </xforms:input>
>> >
>> > <xforms:submit submission="submitModel">
>> > <xforms:label>Submit</xforms:label>
>> > </xforms:submit>
>> >
>> > </body>
>> > </html>
>> >
>> > Then I submit it to the XForms sandbox, but instead of seeing an input
>> > with a button, I get a red exclamation for less than a second and then
>> > dissapears leaving only the button.
>> > What I'm I doing wrong? I'm using tomcat 5.5 with j2se 1.5.
>> >
>> > Also, I've modified the hello world tutorial 3 example with the
>following:
>> >
>> > <html xmlns="http://www.w3.org/1999/xhtml"
>> >  xmlns:xforms="http://www.w3.org/2002/xforms">
>> >  <head>
>> >  <title>Hello World XForms</title>
>> >  <xforms:model>
>> >  <xforms:instance>
>> >  <myForm>
>> >  <first-name xmlns=""/>
>> >  <second-name xmlns=""/>
>> >  </myForm>
>> >  </xforms:instance>
>> >  </xforms:model>
>> >  </head>
>> >  <body>
>> >  <p>
>> >  <xforms:group>
>> >  <xforms:input ref="/myForm/first-name">  <xforms:label>Please enter
>> > your first name:</xforms:label>  </xforms:input>  <br/>  <xforms:input
>> > ref="/myForm/second-name">  <xforms:label>And your second
>> > name:</xforms:label>  </xforms:input>  </xforms:group>  </p>  <p>
>> > <xforms:output value="if (normalize-space(/first-name) = '') then ''
>> > else concat('Hello, ', /first-name, '!')"/>  </p>  </body> </html>
>> >
>> > When I run it, I see the two labels for less then a second next to a
>> > red exclamation and then nothing.
>> >
>> >
>> > ________________________________
>> >
>> >
>> > --
>> > You receive this message as a subscriber of the
>> > [hidden email] mailing list.
>> > To unsubscribe: mailto:[hidden email]
>> > For general help: mailto:[hidden email]?subject=help
>> > ObjectWeb mailing lists service home page:
>> > http://www.objectweb.org/wws
>> >
>> >
>> >
>> >
>> > --
>> > You receive this message as a subscriber of the
>> > [hidden email] mailing list.
>> > To unsubscribe: mailto:[hidden email]
>> > For general help: mailto:[hidden email]?subject=help
>> > ObjectWeb mailing lists service home page:
>> > http://www.objectweb.org/wws
>> >
>> >
>> >
>> >
>>
>>
>> --
>> Saludos.
>> José Antonio Sánchez
>>
>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email]
>mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>>
>>
>
>
>--
>Saludos.
>José Antonio Sánchez




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: What am I doing wrong?

José Antonio Sánchez
I've changed the Ids and namespace but still I can't see the input.
About the submission: it's only a test to learn about xforms and
xhtml, it's not part of a real OPS example or something like that.
Also, it sends it to another machine, not the machine that has OPS.
For now it doesn't matter if submission does something useful it's
just a test, but the real problem is that I cannot see the input.
The modified code:

<xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
        xmlns:xforms="http://www.w3.org/2002/xforms">
<xhtml:head>
<xhtml:title>Insert title here</xhtml:title>
<xforms:model id="myModel">
        <xforms:instance id="main" xmlns="">
                <main>
                        <credit-card>
                                <type />
                                <number>3</number>
                                <expiration-month/>
                                <expiration-year/>
                                <verification-code/>
                                <valid>false</valid>
                        </credit-card>
                </main>
        </xforms:instance>
        <xforms:submission id="submit_model_Envelope"
                action="http://adapt05.ls.fi.upm.es:8081/muse/services/Ssh" method="post" />
</xforms:model>
</xhtml:head>
<xhtml:body>
<xhtml:p>
        <xforms:group>
                <xforms:input ref="instance('main')/credit-card/number">
                        <xforms:label>Number</xforms:label>
                </xforms:input>
                <xforms:submit submission="submit_model_Envelope">
                        <xforms:label>Submit</xforms:label>
                </xforms:submit>
        </xforms:group>
</xhtml:p>
</xhtml:body>
</xhtml:html>

On 3/23/06, Ryan Puddephatt <[hidden email]> wrote:

> Jose,
>         You should have ids on both the model and instance! Also the empty
> namespace need to be on the xforms:instance tag only! All the child elements
> will then take that namespace by default. The submission doesn't work
> because it has not got a ref attribute, this should be "instance('main')"
> also it has not replace. You should look at the docs for more info, but for
> now put replace="all" and this will reload the page or forward on to another
> one. Also you have a full http path in the submission, why? You can put the
> action as part of the page-flow, then OPS will handle it all!
>
> Hope this helps
>
> Ryan Puddephatt
> Software Engineer
> TFX Group - IT UK
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotand
> EH54 7DP
>
> * [hidden email]
> ( 01506 407 110
> 7  01506 407 108
>
>
> >-----Original Message-----
> >From: José Antonio Sánchez [mailto:[hidden email]]
> >Sent: 23 March 2006 12:17
> >To: [hidden email]
> >Subject: Re: [ops-users] What am I doing wrong?
> >
> >Sorry to bother but I don't understand many things:
> >So, if I have only one instance, I can ommit the model tag and then I
> >can reference it as /credit-card/number, for example. Can I put
> >submissions without model? I've tried and it gives me an error.
> >Also, I've made another test, but again, it doesn't work:
> >
> ><xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
> >       xmlns:xforms="http://www.w3.org/2002/xforms">
> ><xhtml:head>
> ><xhtml:title>Insert title here</xhtml:title>
> ><xforms:model>
> >       <xforms:instance id="main">
> >               <main>
> >                       <credit-card>
> >                               <type xmlns=""/>
> >                               <number xmlns="">3</number>
> >                               <expiration-month xmlns=""/>
> >                               <expiration-year xmlns=""/>
> >                               <verification-code xmlns=""/>
> >                               <valid xmlns="">false</valid>
> >                       </credit-card>
> >               </main>
> >       </xforms:instance>
> >       <xforms:submission id="submit_model_Envelope"
> >               action="http://adapt05.ls.fi.upm.es:8081/muse/services/Ssh"
> >method="post" />
> ></xforms:model>
> ></xhtml:head>
> ><xhtml:body>
> ><xhtml:p>
> >       <xforms:group>
> >               <xforms:input ref="instance('main')/credit-card/number">
> >                       <xforms:label>Number</xforms:label>
> >               </xforms:input>
> >               <xforms:submit submission="submit_model_Envelope">
> >                       <xforms:label>Submit</xforms:label>
> >               </xforms:submit>
> >       </xforms:group>
> ></xhtml:p>
> ></xhtml:body>
> ></xhtml:html>
> >
> >Could you tell me what's the problem with this?
> >
> >On 3/23/06, [hidden email] <[hidden email]> wrote:
> >> José ,
> >>
> >> Try the modified version.
> >>
> >> If you are using only one instance, you don't have to give an id
> >parameter to this instance.
> >>
> >> The ref attribute of the input control have to point to an instance node.
> >>
> >> But be carefull with the notation :
> >>
> >> With :
> >> <xforms:instance id="credit-card-instance">
> >>         <credit-card>
> >>                 <type/>
> >>                 <number/>
> >>                 <expiration-month/>
> >>                 <expiration-year/>
> >>                 <verification-code/>
> >>                 <valid/>
> >>         </credit-card>
> >> </xforms:instance>
> >>
> >> You can write :
> >>
> >> <xforms:input ref="/credit-card/number"/>
> >>
> >> Or
> >>
> >> <xforms:input ref="instance('credit-card-instance')/number"/>
> >> Here instance('credit-card-instance') point under the root(credit-card)
> >of the XML instance.
> >>
> >> Marc
> >>
> >> -----Message d'origine-----
> >> De : José Antonio Sánchez [mailto:[hidden email]]
> >> Envoyé : jeudi 23 mars 2006 10:53
> >> À : [hidden email]
> >> Objet : Re: [ops-users] What am I doing wrong?
> >>
> >> OK, your test works.
> >> Now, why according to that
> >> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-model you can
> >> do:
> >>
> >> <xforms:instance id="credit-card-instance">
> >>   <credit-card>
> >>   <type/>
> >>   <number/>
> >>   <expiration-month/>
> >>   <expiration-year/>
> >>   <verification-code/>
> >>   <valid/>
> >>   </credit-card>
> >> </xforms:instance>
> >>
> >> and then reference it as:
> >>
> >> <xforms:input ref="/credit-card/number"/>
> >>
> >> It does not declare any namespace and it does not use the
> >> instance('main') part (Although I tried it and it did not work).
> >>
> >>
> >>
> >> On 3/23/06, [hidden email] <[hidden email]> wrote:
> >> >
> >> > Following Adrain answear,
> >> >
> >> > I attached a modified version of your Hello World sample.
> >> >
> >> > Marc
> >> >
> >> >  ________________________________
> >> >  De : Adrian Baker [mailto:[hidden email]] Envoyé : mercredi
> >> > 22 mars 2006 22:01 À : [hidden email] Objet : Re: [ops-users]
> >> > What am I doing wrong?
> >> >
> >> >
> >> > At a guess I'd say the first issue is caused by the fact that the node
> >> > your input is bound to (/envelope) doesn't exist in your instance
> >> > data. The default behaviour for a control bound to a non-existent node
> >> > is to display as non-relevant (ie hidden), which seems to match what
> >you're seeing.
> >> >
> >> > Secondly, be very careful about the default namespace in your instance
> >> > document. In your first example, the <name> node is actually in the
> >> > xhtml namespace, because this is the default namespace for your form.
> >> > Usually you want to declare the null namespace at the top of the
> >instance like so:
> >> >
> >> > <xforms:instance id="my-model" xmlns="">
> >> >
> >> > Same problem with your second example: <myForm> is in the html
> >> > namespace, so the xpath in your ref would have to be somethine like
> >> > /xhtml:myForm/first-name to work. So again, since it the ref isn't the
> >> > finding the node, it's being made irrelevant (hidden). Add the null
> >> > namespace declaration to the instance and see if this helps.
> >> >
> >> > Adrian
> >> >
> >> > [hidden email] wrote:
> >> > I'm starting evaluating OPS to develop a web application. My target is
> >> > to be able to invoke a web service (a very special web service) with a
> >> > raw SOAP message using XForms to fill some parameters, but I've found
> >> > that nothing seems to work as expected.
> >> > I've made a small xhtml test:
> >> >
> >> > <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC
> >> > "-//W3C//DTD XHTML 1.0 Transitional//EN"
> >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> >> > <html xmlns="http://www.w3.org/1999/xhtml"
> >> >  xmlns:xforms="http://www.w3.org/2002/xforms">
> >> > <head>
> >> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
> >> > <title>Insert title here</title> <xforms:model id="my-model">
> >> > <xforms:instance id="my-instance">  <name/>  </xforms:instance>
> >> > <xforms:submission id="submitModel"
> >> >  action="http://localhost:8081/muse/services/Ssh"
> >> > method="post" />
> >> > </xforms:model>
> >> > </head>
> >> > <body>
> >> >
> >> > <xforms:input ref="/envelope">
> >> >  <xforms:label>Valid</xforms:label>
> >> > </xforms:input>
> >> >
> >> > <xforms:submit submission="submitModel">
> >> > <xforms:label>Submit</xforms:label>
> >> > </xforms:submit>
> >> >
> >> > </body>
> >> > </html>
> >> >
> >> > Then I submit it to the XForms sandbox, but instead of seeing an input
> >> > with a button, I get a red exclamation for less than a second and then
> >> > dissapears leaving only the button.
> >> > What I'm I doing wrong? I'm using tomcat 5.5 with j2se 1.5.
> >> >
> >> > Also, I've modified the hello world tutorial 3 example with the
> >following:
> >> >
> >> > <html xmlns="http://www.w3.org/1999/xhtml"
> >> >  xmlns:xforms="http://www.w3.org/2002/xforms">
> >> >  <head>
> >> >  <title>Hello World XForms</title>
> >> >  <xforms:model>
> >> >  <xforms:instance>
> >> >  <myForm>
> >> >  <first-name xmlns=""/>
> >> >  <second-name xmlns=""/>
> >> >  </myForm>
> >> >  </xforms:instance>
> >> >  </xforms:model>
> >> >  </head>
> >> >  <body>
> >> >  <p>
> >> >  <xforms:group>
> >> >  <xforms:input ref="/myForm/first-name">  <xforms:label>Please enter
> >> > your first name:</xforms:label>  </xforms:input>  <br/>  <xforms:input
> >> > ref="/myForm/second-name">  <xforms:label>And your second
> >> > name:</xforms:label>  </xforms:input>  </xforms:group>  </p>  <p>
> >> > <xforms:output value="if (normalize-space(/first-name) = '') then ''
> >> > else concat('Hello, ', /first-name, '!')"/>  </p>  </body> </html>
> >> >
> >> > When I run it, I see the two labels for less then a second next to a
> >> > red exclamation and then nothing.
> >> >
> >> >
> >> > ________________________________
> >> >
> >> >
> >> > --
> >> > You receive this message as a subscriber of the
> >> > [hidden email] mailing list.
> >> > To unsubscribe: mailto:[hidden email]
> >> > For general help: mailto:[hidden email]?subject=help
> >> > ObjectWeb mailing lists service home page:
> >> > http://www.objectweb.org/wws
> >> >
> >> >
> >> >
> >> >
> >> > --
> >> > You receive this message as a subscriber of the
> >> > [hidden email] mailing list.
> >> > To unsubscribe: mailto:[hidden email]
> >> > For general help: mailto:[hidden email]?subject=help
> >> > ObjectWeb mailing lists service home page:
> >> > http://www.objectweb.org/wws
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >> --
> >> Saludos.
> >> José Antonio Sánchez
> >>
> >>
> >>
> >>
> >> --
> >> You receive this message as a subscriber of the [hidden email]
> >mailing list.
> >> To unsubscribe: mailto:[hidden email]
> >> For general help: mailto:[hidden email]?subject=help
> >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >>
> >>
> >>
> >>
> >
> >
> >--
> >Saludos.
> >José Antonio Sánchez
>
>
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Saludos.
José Antonio Sánchez



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

RE: What am I doing wrong?

Ryan Puddephatt
That code works fine for me

Ryan Puddephatt
Software Engineer
TFX Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotand
EH54 7DP
 
* [hidden email]
( 01506 407 110
7  01506 407 108
 

>-----Original Message-----
>From: José Antonio Sánchez [mailto:[hidden email]]
>Sent: 23 March 2006 13:38
>To: [hidden email]
>Subject: Re: [ops-users] What am I doing wrong?
>
>I've changed the Ids and namespace but still I can't see the input.
>About the submission: it's only a test to learn about xforms and
>xhtml, it's not part of a real OPS example or something like that.
>Also, it sends it to another machine, not the machine that has OPS.
>For now it doesn't matter if submission does something useful it's
>just a test, but the real problem is that I cannot see the input.
>The modified code:
>
><xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
> xmlns:xforms="http://www.w3.org/2002/xforms">
><xhtml:head>
><xhtml:title>Insert title here</xhtml:title>
><xforms:model id="myModel">
> <xforms:instance id="main" xmlns="">
> <main>
> <credit-card>
> <type />
> <number>3</number>
> <expiration-month/>
> <expiration-year/>
> <verification-code/>
> <valid>false</valid>
> </credit-card>
> </main>
> </xforms:instance>
> <xforms:submission id="submit_model_Envelope"
> action="http://adapt05.ls.fi.upm.es:8081/muse/services/Ssh"
>method="post" />
></xforms:model>
></xhtml:head>
><xhtml:body>
><xhtml:p>
> <xforms:group>
> <xforms:input ref="instance('main')/credit-card/number">
> <xforms:label>Number</xforms:label>
> </xforms:input>
> <xforms:submit submission="submit_model_Envelope">
> <xforms:label>Submit</xforms:label>
> </xforms:submit>
> </xforms:group>
></xhtml:p>
></xhtml:body>
></xhtml:html>
>
>On 3/23/06, Ryan Puddephatt <[hidden email]> wrote:
>> Jose,
>>         You should have ids on both the model and instance! Also the
>empty
>> namespace need to be on the xforms:instance tag only! All the child
>elements
>> will then take that namespace by default. The submission doesn't work
>> because it has not got a ref attribute, this should be "instance('main')"
>> also it has not replace. You should look at the docs for more info, but
>for
>> now put replace="all" and this will reload the page or forward on to
>another
>> one. Also you have a full http path in the submission, why? You can put
>the
>> action as part of the page-flow, then OPS will handle it all!
>>
>> Hope this helps
>>
>> Ryan Puddephatt
>> Software Engineer
>> TFX Group - IT UK
>> 1 Michaelson Square
>> Livingston
>> West Lothian
>> Scotand
>> EH54 7DP
>>
>> * [hidden email]
>> ( 01506 407 110
>> 7  01506 407 108
>>
>>
>> >-----Original Message-----
>> >From: José Antonio Sánchez [mailto:[hidden email]]
>> >Sent: 23 March 2006 12:17
>> >To: [hidden email]
>> >Subject: Re: [ops-users] What am I doing wrong?
>> >
>> >Sorry to bother but I don't understand many things:
>> >So, if I have only one instance, I can ommit the model tag and then I
>> >can reference it as /credit-card/number, for example. Can I put
>> >submissions without model? I've tried and it gives me an error.
>> >Also, I've made another test, but again, it doesn't work:
>> >
>> ><xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
>> >       xmlns:xforms="http://www.w3.org/2002/xforms">
>> ><xhtml:head>
>> ><xhtml:title>Insert title here</xhtml:title>
>> ><xforms:model>
>> >       <xforms:instance id="main">
>> >               <main>
>> >                       <credit-card>
>> >                               <type xmlns=""/>
>> >                               <number xmlns="">3</number>
>> >                               <expiration-month xmlns=""/>
>> >                               <expiration-year xmlns=""/>
>> >                               <verification-code xmlns=""/>
>> >                               <valid xmlns="">false</valid>
>> >                       </credit-card>
>> >               </main>
>> >       </xforms:instance>
>> >       <xforms:submission id="submit_model_Envelope"
>> >
>action="http://adapt05.ls.fi.upm.es:8081/muse/services/Ssh"
>> >method="post" />
>> ></xforms:model>
>> ></xhtml:head>
>> ><xhtml:body>
>> ><xhtml:p>
>> >       <xforms:group>
>> >               <xforms:input ref="instance('main')/credit-card/number">
>> >                       <xforms:label>Number</xforms:label>
>> >               </xforms:input>
>> >               <xforms:submit submission="submit_model_Envelope">
>> >                       <xforms:label>Submit</xforms:label>
>> >               </xforms:submit>
>> >       </xforms:group>
>> ></xhtml:p>
>> ></xhtml:body>
>> ></xhtml:html>
>> >
>> >Could you tell me what's the problem with this?
>> >
>> >On 3/23/06, [hidden email] <[hidden email]> wrote:
>> >> José ,
>> >>
>> >> Try the modified version.
>> >>
>> >> If you are using only one instance, you don't have to give an id
>> >parameter to this instance.
>> >>
>> >> The ref attribute of the input control have to point to an instance
>node.
>> >>
>> >> But be carefull with the notation :
>> >>
>> >> With :
>> >> <xforms:instance id="credit-card-instance">
>> >>         <credit-card>
>> >>                 <type/>
>> >>                 <number/>
>> >>                 <expiration-month/>
>> >>                 <expiration-year/>
>> >>                 <verification-code/>
>> >>                 <valid/>
>> >>         </credit-card>
>> >> </xforms:instance>
>> >>
>> >> You can write :
>> >>
>> >> <xforms:input ref="/credit-card/number"/>
>> >>
>> >> Or
>> >>
>> >> <xforms:input ref="instance('credit-card-instance')/number"/>
>> >> Here instance('credit-card-instance') point under the root(credit-
>card)
>> >of the XML instance.
>> >>
>> >> Marc
>> >>
>> >> -----Message d'origine-----
>> >> De : José Antonio Sánchez [mailto:[hidden email]]
>> >> Envoyé : jeudi 23 mars 2006 10:53
>> >> À : [hidden email]
>> >> Objet : Re: [ops-users] What am I doing wrong?
>> >>
>> >> OK, your test works.
>> >> Now, why according to that
>> >> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-model you can
>> >> do:
>> >>
>> >> <xforms:instance id="credit-card-instance">
>> >>   <credit-card>
>> >>   <type/>
>> >>   <number/>
>> >>   <expiration-month/>
>> >>   <expiration-year/>
>> >>   <verification-code/>
>> >>   <valid/>
>> >>   </credit-card>
>> >> </xforms:instance>
>> >>
>> >> and then reference it as:
>> >>
>> >> <xforms:input ref="/credit-card/number"/>
>> >>
>> >> It does not declare any namespace and it does not use the
>> >> instance('main') part (Although I tried it and it did not work).
>> >>
>> >>
>> >>
>> >> On 3/23/06, [hidden email] <[hidden email]> wrote:
>> >> >
>> >> > Following Adrain answear,
>> >> >
>> >> > I attached a modified version of your Hello World sample.
>> >> >
>> >> > Marc
>> >> >
>> >> >  ________________________________
>> >> >  De : Adrian Baker [mailto:[hidden email]] Envoyé :
>mercredi
>> >> > 22 mars 2006 22:01 À : [hidden email] Objet : Re: [ops-
>users]
>> >> > What am I doing wrong?
>> >> >
>> >> >
>> >> > At a guess I'd say the first issue is caused by the fact that the
>node
>> >> > your input is bound to (/envelope) doesn't exist in your instance
>> >> > data. The default behaviour for a control bound to a non-existent
>node
>> >> > is to display as non-relevant (ie hidden), which seems to match what
>> >you're seeing.
>> >> >
>> >> > Secondly, be very careful about the default namespace in your
>instance
>> >> > document. In your first example, the <name> node is actually in the
>> >> > xhtml namespace, because this is the default namespace for your
>form.
>> >> > Usually you want to declare the null namespace at the top of the
>> >instance like so:
>> >> >
>> >> > <xforms:instance id="my-model" xmlns="">
>> >> >
>> >> > Same problem with your second example: <myForm> is in the html
>> >> > namespace, so the xpath in your ref would have to be somethine like
>> >> > /xhtml:myForm/first-name to work. So again, since it the ref isn't
>the
>> >> > finding the node, it's being made irrelevant (hidden). Add the null
>> >> > namespace declaration to the instance and see if this helps.
>> >> >
>> >> > Adrian
>> >> >
>> >> > [hidden email] wrote:
>> >> > I'm starting evaluating OPS to develop a web application. My target
>is
>> >> > to be able to invoke a web service (a very special web service) with
>a
>> >> > raw SOAP message using XForms to fill some parameters, but I've
>found
>> >> > that nothing seems to work as expected.
>> >> > I've made a small xhtml test:
>> >> >
>> >> > <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC
>> >> > "-//W3C//DTD XHTML 1.0 Transitional//EN"
>> >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>> >> > <html xmlns="http://www.w3.org/1999/xhtml"
>> >> >  xmlns:xforms="http://www.w3.org/2002/xforms">
>> >> > <head>
>> >> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
>/>
>> >> > <title>Insert title here</title> <xforms:model id="my-model">
>> >> > <xforms:instance id="my-instance">  <name/>  </xforms:instance>
>> >> > <xforms:submission id="submitModel"
>> >> >  action="http://localhost:8081/muse/services/Ssh"
>> >> > method="post" />
>> >> > </xforms:model>
>> >> > </head>
>> >> > <body>
>> >> >
>> >> > <xforms:input ref="/envelope">
>> >> >  <xforms:label>Valid</xforms:label>
>> >> > </xforms:input>
>> >> >
>> >> > <xforms:submit submission="submitModel">
>> >> > <xforms:label>Submit</xforms:label>
>> >> > </xforms:submit>
>> >> >
>> >> > </body>
>> >> > </html>
>> >> >
>> >> > Then I submit it to the XForms sandbox, but instead of seeing an
>input
>> >> > with a button, I get a red exclamation for less than a second and
>then
>> >> > dissapears leaving only the button.
>> >> > What I'm I doing wrong? I'm using tomcat 5.5 with j2se 1.5.
>> >> >
>> >> > Also, I've modified the hello world tutorial 3 example with the
>> >following:
>> >> >
>> >> > <html xmlns="http://www.w3.org/1999/xhtml"
>> >> >  xmlns:xforms="http://www.w3.org/2002/xforms">
>> >> >  <head>
>> >> >  <title>Hello World XForms</title>
>> >> >  <xforms:model>
>> >> >  <xforms:instance>
>> >> >  <myForm>
>> >> >  <first-name xmlns=""/>
>> >> >  <second-name xmlns=""/>
>> >> >  </myForm>
>> >> >  </xforms:instance>
>> >> >  </xforms:model>
>> >> >  </head>
>> >> >  <body>
>> >> >  <p>
>> >> >  <xforms:group>
>> >> >  <xforms:input ref="/myForm/first-name">  <xforms:label>Please enter
>> >> > your first name:</xforms:label>  </xforms:input>  <br/>
><xforms:input
>> >> > ref="/myForm/second-name">  <xforms:label>And your second
>> >> > name:</xforms:label>  </xforms:input>  </xforms:group>  </p>  <p>
>> >> > <xforms:output value="if (normalize-space(/first-name) = '') then ''
>> >> > else concat('Hello, ', /first-name, '!')"/>  </p>  </body> </html>
>> >> >
>> >> > When I run it, I see the two labels for less then a second next to a
>> >> > red exclamation and then nothing.
>> >> >
>> >> >
>> >> > ________________________________
>> >> >
>> >> >
>> >> > --
>> >> > You receive this message as a subscriber of the
>> >> > [hidden email] mailing list.
>> >> > To unsubscribe: mailto:[hidden email]
>> >> > For general help: mailto:[hidden email]?subject=help
>> >> > ObjectWeb mailing lists service home page:
>> >> > http://www.objectweb.org/wws
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > You receive this message as a subscriber of the
>> >> > [hidden email] mailing list.
>> >> > To unsubscribe: mailto:[hidden email]
>> >> > For general help: mailto:[hidden email]?subject=help
>> >> > ObjectWeb mailing lists service home page:
>> >> > http://www.objectweb.org/wws
>> >> >
>> >> >
>> >> >
>> >> >
>> >>
>> >>
>> >> --
>> >> Saludos.
>> >> José Antonio Sánchez
>> >>
>> >>
>> >>
>> >>
>> >> --
>> >> You receive this message as a subscriber of the ops-
>[hidden email]
>> >mailing list.
>> >> To unsubscribe: mailto:[hidden email]
>> >> For general help: mailto:[hidden email]?subject=help
>> >> ObjectWeb mailing lists service home page:
>http://www.objectweb.org/wws
>> >>
>> >>
>> >>
>> >>
>> >
>> >
>> >--
>> >Saludos.
>> >José Antonio Sánchez
>>
>>
>>
>>
>>
>>
>> --
>> You receive this message as a subscriber of the [hidden email]
>mailing list.
>> To unsubscribe: mailto:[hidden email]
>> For general help: mailto:[hidden email]?subject=help
>> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>>
>>
>>
>
>
>--
>Saludos.
>José Antonio Sánchez




--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: What am I doing wrong?

José Antonio Sánchez
It was my mistake. Probably Firefox was caching the bad version. I've
re-uploaded the file and now it works.

On 3/23/06, Ryan Puddephatt <[hidden email]> wrote:

> That code works fine for me
>
> Ryan Puddephatt
> Software Engineer
> TFX Group - IT UK
> 1 Michaelson Square
> Livingston
> West Lothian
> Scotand
> EH54 7DP
>
> * [hidden email]
> ( 01506 407 110
> 7  01506 407 108
>
>
> >-----Original Message-----
> >From: José Antonio Sánchez [mailto:[hidden email]]
> >Sent: 23 March 2006 13:38
> >To: [hidden email]
> >Subject: Re: [ops-users] What am I doing wrong?
> >
> >I've changed the Ids and namespace but still I can't see the input.
> >About the submission: it's only a test to learn about xforms and
> >xhtml, it's not part of a real OPS example or something like that.
> >Also, it sends it to another machine, not the machine that has OPS.
> >For now it doesn't matter if submission does something useful it's
> >just a test, but the real problem is that I cannot see the input.
> >The modified code:
> >
> ><xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
> >       xmlns:xforms="http://www.w3.org/2002/xforms">
> ><xhtml:head>
> ><xhtml:title>Insert title here</xhtml:title>
> ><xforms:model id="myModel">
> >       <xforms:instance id="main" xmlns="">
> >               <main>
> >                       <credit-card>
> >                               <type />
> >                               <number>3</number>
> >                               <expiration-month/>
> >                               <expiration-year/>
> >                               <verification-code/>
> >                               <valid>false</valid>
> >                       </credit-card>
> >               </main>
> >       </xforms:instance>
> >       <xforms:submission id="submit_model_Envelope"
> >               action="http://adapt05.ls.fi.upm.es:8081/muse/services/Ssh"
> >method="post" />
> ></xforms:model>
> ></xhtml:head>
> ><xhtml:body>
> ><xhtml:p>
> >       <xforms:group>
> >               <xforms:input ref="instance('main')/credit-card/number">
> >                       <xforms:label>Number</xforms:label>
> >               </xforms:input>
> >               <xforms:submit submission="submit_model_Envelope">
> >                       <xforms:label>Submit</xforms:label>
> >               </xforms:submit>
> >       </xforms:group>
> ></xhtml:p>
> ></xhtml:body>
> ></xhtml:html>
> >
> >On 3/23/06, Ryan Puddephatt <[hidden email]> wrote:
> >> Jose,
> >>         You should have ids on both the model and instance! Also the
> >empty
> >> namespace need to be on the xforms:instance tag only! All the child
> >elements
> >> will then take that namespace by default. The submission doesn't work
> >> because it has not got a ref attribute, this should be "instance('main')"
> >> also it has not replace. You should look at the docs for more info, but
> >for
> >> now put replace="all" and this will reload the page or forward on to
> >another
> >> one. Also you have a full http path in the submission, why? You can put
> >the
> >> action as part of the page-flow, then OPS will handle it all!
> >>
> >> Hope this helps
> >>
> >> Ryan Puddephatt
> >> Software Engineer
> >> TFX Group - IT UK
> >> 1 Michaelson Square
> >> Livingston
> >> West Lothian
> >> Scotand
> >> EH54 7DP
> >>
> >> * [hidden email]
> >> ( 01506 407 110
> >> 7  01506 407 108
> >>
> >>
> >> >-----Original Message-----
> >> >From: José Antonio Sánchez [mailto:[hidden email]]
> >> >Sent: 23 March 2006 12:17
> >> >To: [hidden email]
> >> >Subject: Re: [ops-users] What am I doing wrong?
> >> >
> >> >Sorry to bother but I don't understand many things:
> >> >So, if I have only one instance, I can ommit the model tag and then I
> >> >can reference it as /credit-card/number, for example. Can I put
> >> >submissions without model? I've tried and it gives me an error.
> >> >Also, I've made another test, but again, it doesn't work:
> >> >
> >> ><xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml"
> >> >       xmlns:xforms="http://www.w3.org/2002/xforms">
> >> ><xhtml:head>
> >> ><xhtml:title>Insert title here</xhtml:title>
> >> ><xforms:model>
> >> >       <xforms:instance id="main">
> >> >               <main>
> >> >                       <credit-card>
> >> >                               <type xmlns=""/>
> >> >                               <number xmlns="">3</number>
> >> >                               <expiration-month xmlns=""/>
> >> >                               <expiration-year xmlns=""/>
> >> >                               <verification-code xmlns=""/>
> >> >                               <valid xmlns="">false</valid>
> >> >                       </credit-card>
> >> >               </main>
> >> >       </xforms:instance>
> >> >       <xforms:submission id="submit_model_Envelope"
> >> >
> >action="http://adapt05.ls.fi.upm.es:8081/muse/services/Ssh"
> >> >method="post" />
> >> ></xforms:model>
> >> ></xhtml:head>
> >> ><xhtml:body>
> >> ><xhtml:p>
> >> >       <xforms:group>
> >> >               <xforms:input ref="instance('main')/credit-card/number">
> >> >                       <xforms:label>Number</xforms:label>
> >> >               </xforms:input>
> >> >               <xforms:submit submission="submit_model_Envelope">
> >> >                       <xforms:label>Submit</xforms:label>
> >> >               </xforms:submit>
> >> >       </xforms:group>
> >> ></xhtml:p>
> >> ></xhtml:body>
> >> ></xhtml:html>
> >> >
> >> >Could you tell me what's the problem with this?
> >> >
> >> >On 3/23/06, [hidden email] <[hidden email]> wrote:
> >> >> José ,
> >> >>
> >> >> Try the modified version.
> >> >>
> >> >> If you are using only one instance, you don't have to give an id
> >> >parameter to this instance.
> >> >>
> >> >> The ref attribute of the input control have to point to an instance
> >node.
> >> >>
> >> >> But be carefull with the notation :
> >> >>
> >> >> With :
> >> >> <xforms:instance id="credit-card-instance">
> >> >>         <credit-card>
> >> >>                 <type/>
> >> >>                 <number/>
> >> >>                 <expiration-month/>
> >> >>                 <expiration-year/>
> >> >>                 <verification-code/>
> >> >>                 <valid/>
> >> >>         </credit-card>
> >> >> </xforms:instance>
> >> >>
> >> >> You can write :
> >> >>
> >> >> <xforms:input ref="/credit-card/number"/>
> >> >>
> >> >> Or
> >> >>
> >> >> <xforms:input ref="instance('credit-card-instance')/number"/>
> >> >> Here instance('credit-card-instance') point under the root(credit-
> >card)
> >> >of the XML instance.
> >> >>
> >> >> Marc
> >> >>
> >> >> -----Message d'origine-----
> >> >> De : José Antonio Sánchez [mailto:[hidden email]]
> >> >> Envoyé : jeudi 23 mars 2006 10:53
> >> >> Ŕ : [hidden email]
> >> >> Objet : Re: [ops-users] What am I doing wrong?
> >> >>
> >> >> OK, your test works.
> >> >> Now, why according to that
> >> >> http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-model you can
> >> >> do:
> >> >>
> >> >> <xforms:instance id="credit-card-instance">
> >> >>   <credit-card>
> >> >>   <type/>
> >> >>   <number/>
> >> >>   <expiration-month/>
> >> >>   <expiration-year/>
> >> >>   <verification-code/>
> >> >>   <valid/>
> >> >>   </credit-card>
> >> >> </xforms:instance>
> >> >>
> >> >> and then reference it as:
> >> >>
> >> >> <xforms:input ref="/credit-card/number"/>
> >> >>
> >> >> It does not declare any namespace and it does not use the
> >> >> instance('main') part (Although I tried it and it did not work).
> >> >>
> >> >>
> >> >>
> >> >> On 3/23/06, [hidden email] <[hidden email]> wrote:
> >> >> >
> >> >> > Following Adrain answear,
> >> >> >
> >> >> > I attached a modified version of your Hello World sample.
> >> >> >
> >> >> > Marc
> >> >> >
> >> >> >  ________________________________
> >> >> >  De : Adrian Baker [mailto:[hidden email]] Envoyé :
> >mercredi
> >> >> > 22 mars 2006 22:01 Ŕ : [hidden email] Objet : Re: [ops-
> >users]
> >> >> > What am I doing wrong?
> >> >> >
> >> >> >
> >> >> > At a guess I'd say the first issue is caused by the fact that the
> >node
> >> >> > your input is bound to (/envelope) doesn't exist in your instance
> >> >> > data. The default behaviour for a control bound to a non-existent
> >node
> >> >> > is to display as non-relevant (ie hidden), which seems to match what
> >> >you're seeing.
> >> >> >
> >> >> > Secondly, be very careful about the default namespace in your
> >instance
> >> >> > document. In your first example, the <name> node is actually in the
> >> >> > xhtml namespace, because this is the default namespace for your
> >form.
> >> >> > Usually you want to declare the null namespace at the top of the
> >> >instance like so:
> >> >> >
> >> >> > <xforms:instance id="my-model" xmlns="">
> >> >> >
> >> >> > Same problem with your second example: <myForm> is in the html
> >> >> > namespace, so the xpath in your ref would have to be somethine like
> >> >> > /xhtml:myForm/first-name to work. So again, since it the ref isn't
> >the
> >> >> > finding the node, it's being made irrelevant (hidden). Add the null
> >> >> > namespace declaration to the instance and see if this helps.
> >> >> >
> >> >> > Adrian
> >> >> >
> >> >> > [hidden email] wrote:
> >> >> > I'm starting evaluating OPS to develop a web application. My target
> >is
> >> >> > to be able to invoke a web service (a very special web service) with
> >a
> >> >> > raw SOAP message using XForms to fill some parameters, but I've
> >found
> >> >> > that nothing seems to work as expected.
> >> >> > I've made a small xhtml test:
> >> >> >
> >> >> > <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE html PUBLIC
> >> >> > "-//W3C//DTD XHTML 1.0 Transitional//EN"
> >> >> > "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> >> >> > <html xmlns="http://www.w3.org/1999/xhtml"
> >> >> >  xmlns:xforms="http://www.w3.org/2002/xforms">
> >> >> > <head>
> >> >> > <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"
> >/>
> >> >> > <title>Insert title here</title> <xforms:model id="my-model">
> >> >> > <xforms:instance id="my-instance">  <name/>  </xforms:instance>
> >> >> > <xforms:submission id="submitModel"
> >> >> >  action="http://localhost:8081/muse/services/Ssh"
> >> >> > method="post" />
> >> >> > </xforms:model>
> >> >> > </head>
> >> >> > <body>
> >> >> >
> >> >> > <xforms:input ref="/envelope">
> >> >> >  <xforms:label>Valid</xforms:label>
> >> >> > </xforms:input>
> >> >> >
> >> >> > <xforms:submit submission="submitModel">
> >> >> > <xforms:label>Submit</xforms:label>
> >> >> > </xforms:submit>
> >> >> >
> >> >> > </body>
> >> >> > </html>
> >> >> >
> >> >> > Then I submit it to the XForms sandbox, but instead of seeing an
> >input
> >> >> > with a button, I get a red exclamation for less than a second and
> >then
> >> >> > dissapears leaving only the button.
> >> >> > What I'm I doing wrong? I'm using tomcat 5.5 with j2se 1.5.
> >> >> >
> >> >> > Also, I've modified the hello world tutorial 3 example with the
> >> >following:
> >> >> >
> >> >> > <html xmlns="http://www.w3.org/1999/xhtml"
> >> >> >  xmlns:xforms="http://www.w3.org/2002/xforms">
> >> >> >  <head>
> >> >> >  <title>Hello World XForms</title>
> >> >> >  <xforms:model>
> >> >> >  <xforms:instance>
> >> >> >  <myForm>
> >> >> >  <first-name xmlns=""/>
> >> >> >  <second-name xmlns=""/>
> >> >> >  </myForm>
> >> >> >  </xforms:instance>
> >> >> >  </xforms:model>
> >> >> >  </head>
> >> >> >  <body>
> >> >> >  <p>
> >> >> >  <xforms:group>
> >> >> >  <xforms:input ref="/myForm/first-name">  <xforms:label>Please enter
> >> >> > your first name:</xforms:label>  </xforms:input>  <br/>
> ><xforms:input
> >> >> > ref="/myForm/second-name">  <xforms:label>And your second
> >> >> > name:</xforms:label>  </xforms:input>  </xforms:group>  </p>  <p>
> >> >> > <xforms:output value="if (normalize-space(/first-name) = '') then ''
> >> >> > else concat('Hello, ', /first-name, '!')"/>  </p>  </body> </html>
> >> >> >
> >> >> > When I run it, I see the two labels for less then a second next to a
> >> >> > red exclamation and then nothing.
> >> >> >
> >> >> >
> >> >> > ________________________________
> >> >> >
> >> >> >
> >> >> > --
> >> >> > You receive this message as a subscriber of the
> >> >> > [hidden email] mailing list.
> >> >> > To unsubscribe: mailto:[hidden email]
> >> >> > For general help: mailto:[hidden email]?subject=help
> >> >> > ObjectWeb mailing lists service home page:
> >> >> > http://www.objectweb.org/wws
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > You receive this message as a subscriber of the
> >> >> > [hidden email] mailing list.
> >> >> > To unsubscribe: mailto:[hidden email]
> >> >> > For general help: mailto:[hidden email]?subject=help
> >> >> > ObjectWeb mailing lists service home page:
> >> >> > http://www.objectweb.org/wws
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >>
> >> >> --
> >> >> Saludos.
> >> >> José Antonio Sánchez
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> --
> >> >> You receive this message as a subscriber of the ops-
> >[hidden email]
> >> >mailing list.
> >> >> To unsubscribe: mailto:[hidden email]
> >> >> For general help: mailto:[hidden email]?subject=help
> >> >> ObjectWeb mailing lists service home page:
> >http://www.objectweb.org/wws
> >> >>
> >> >>
> >> >>
> >> >>
> >> >
> >> >
> >> >--
> >> >Saludos.
> >> >José Antonio Sánchez
> >>
> >>
> >>
> >>
> >>
> >>
> >> --
> >> You receive this message as a subscriber of the [hidden email]
> >mailing list.
> >> To unsubscribe: mailto:[hidden email]
> >> For general help: mailto:[hidden email]?subject=help
> >> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
> >>
> >>
> >>
> >
> >
> >--
> >Saludos.
> >José Antonio Sánchez
>
>
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>
>

--
Saludos.
José Antonio Sánchez


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws