RE: How to not check a textbox if empy

<[email protected]> Mon, 12 May 2003 10:45:21 +0200
Newsgroups gmane.text.xml.schematron
Message-ID <[email protected]>
Hi Edvard,

Thanks, it works.

Is it also possible, instead of do not check the format if the textbox is empty, to check the format only if a checkbox is set to true?

Regards
Sylvain


-----Message d'origine-----
De: Edvard Robertsson [mailto:[email protected]]
Date: samedi, 10. mai 2003 12:12
À: Thévoz Sylvain, IT-DTS-ENG-SDM-DAR;
[email protected]
Objet: Re: [Schematron-love-in] How to not check a textbox if empy


Hi Sylvain,

>I need to check the format of a string in a textbox.
>But I want to check ONLY if there is something in the textbox.
>I need to have the possibility to not enter a value in this textbox.
>
>Here is the pseudo-code to check the format:
>
><!-- CHECK FOR VALID FORMAT -->
><sch:assert test="
>...... check format......
>    ">
>    <sch:name/> does not contain a valid format.
></sch:assert>
>
>How could I do that?

I think you can just add to the assertion that either the text content is 
empty OR it conforms to the specfic format:

<!-- CHECK FOR VALID FORMAT -->
<sch:assert test="string-length(.)=0 or (...... check format......)">
    <sch:name/> does not contain a valid format.
</sch:assert>

Cheers,
/Eddie

>
>Thanks
>Sylvain
>
>
>-------------------------------------------------------
>Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
>The only event dedicated to issues related to Linux enterprise solutions
>www.enterpriselinuxforum.com
>
>_______________________________________________
>Schematron-love-in mailing list
>[email protected]
>https://lists.sourceforge.net/lists/listinfo/schematron-love-in

_________________________________________________________________
Add photos to your e-mail with MSN 8. Get 2 months FREE*. 
http://join.msn.com/?page=features/featuredemail



-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com