以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 HTML/XHTML/Ajax/Web 2.0/Web 3.0 』  (http://bbs.xml.org.cn/list.asp?boardid=22)
----  那位大侠帮帮忙,看看怎么解释这个xforms的程序!!  (http://bbs.xml.org.cn/dispbbs.asp?boardid=22&rootid=&id=56613)


--  作者:xc_xiefei2007
--  发布时间:12/11/2007 3:22:00 PM

--  那位大侠帮帮忙,看看怎么解释这个xforms的程序!!
这个程序如果不填密码的时候,会有错误信息,这个错误信息是怎么出来的(程序里哪里有指示),请帮忙看看,万分感谢!!!
Listing 6.10:XForms例
<?xml version="1.0" encoding="ISO-8859-1"?>
  <!--<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML Basic 1.0//EN"
  "http://www.w3.org/TR/xhtml-basic/xhtml-basic10.dtd">-->
  <html xmlns="http://www.w3.org/1999/xhtml"
           xmlns:ev="http://www.w3.org/2001/xml-events"
           xmlns:testcase="testcase"
           xmlns:xforms="http://www.w3.org/2002/01/xforms">
      <head>
          <link href="controls.css" rel="stylesheet" type="text/css"/>
          <xforms:model id="form1">
              <xforms:submitInfo id="submit1"
                      localfile="temp2.xm1" method2="postxml"
                      target2="http://www.trumantruck.com/" />
              <xforms:instance id="instancel" xmlns=" ">
                  <testcase>
                      <username/>
                      <secret/>
                  </testcase>
              </xforms:instance>
              <xforms:bind
                  isValid="string-length (.)&gt;0" ref="testcase/secret"/>
              <xforms:bind
                   isValid="string-length (.)&gt;0" ref="testcase/username"/>
          </xforms:model>
      </head>
      <body>
          <B>User Name:</B>
          <xforms:input ref="testcase/testcase:input" xmlns:my="test">
              <xforms:caption>Enter your name</xforms:caption>
          </xforms:input>
          <b>Password:</b>
          <xforms:secret ref="testcase/secret">
              <xforms:caption>Password</xforms:caption>
          </xforms:secret>
          <b>submit</b>
          <xforms:submit>
              <xforms:caption>Submit Me</xforms:caption>
          </xforms:submit>
      </body>
  </html>

--  作者:Qr
--  发布时间:12/11/2007 7:01:00 PM

--  
<xforms:bind
                  isValid="string-length (.)&gt;0" ref="testcase/secret"/>
              <xforms:bind
                   isValid="string-length (.)&gt;0" ref="testcase/username"/>

W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
62.988ms