新书推介:《语义网技术体系》
作者:瞿裕忠,胡伟,程龚
   XML论坛     W3CHINA.ORG讨论区     计算机科学论坛     SOAChina论坛     Blog     开放翻译计划     新浪微博  
 
  • 首页
  • 登录
  • 注册
  • 软件下载
  • 资料下载
  • 核心成员
  • 帮助
  •   Add to Google

    >> 本版讨论XSL,XSLT,XSL-FO,CSS等技术
    [返回] 计算机科学论坛XML.ORG.CN讨论区 - XML技术『 XSL/XSLT/XSL-FO/CSS 』 → [求助]命名空间 查看新帖用户列表

      发表一个新主题  发表一个新投票  回复主题  (订阅本版) 您是本帖的第 2592 个阅读者浏览上一篇主题  刷新本主题   树形显示贴子 浏览下一篇主题
     * 贴子主题: [求助]命名空间 举报  打印  推荐  IE收藏夹 
       本主题类别:     
     lewisw 帅哥哟,离线,有人找我吗?
      
      
      等级:大一新生
      文章:4
      积分:67
      门派:XML.ORG.CN
      注册:2004/12/16

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给lewisw发送一个短消息 把lewisw加入好友 查看lewisw的个人资料 搜索lewisw在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 引用回复这个贴子 回复这个贴子 查看lewisw的博客楼主
    发贴心情 [求助]命名空间

    用浏览器打开xml文件的时候报错:
    Reference to undeclared namespace prefix: 'SOAP'.
    Error occurred during compilation of included or imported stylesheet 'f...

    GetOcUserProfileResponse.xml文件:
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="GetOcUserProfileResponse.xsl"?>
    <SOAP:Envelope xmlns:SOAP="http://www.w3.org/2001/12/soap-envelop">
     <SOAP:Header>
      <Result>Success</Result>
     </SOAP:Header>
     <SOAP:Body>
      <GetOCUserProfileResponse xmlns="http://schemas.webex.com/occonnect/integration/community">
       <Name>Jonas</Name>
       <CommunityName>www.webex.com</CommunityName>
       <Gender>male</Gender>
       <Age>28</Age>
       <MartalStatus> </MartalStatus>
       <Country>China</Country>
       <State/>
       <City/>
       <Zipcode/>
       <Email>jonasj@hz.webex.com</Email>
       <Address/>
       <Title/>
       <Company>WEBEX</Company>
       <TimeZone>BeiJing</TimeZone>
      </GetOCUserProfileResponse>
     </SOAP:Body>
    </SOAP:Envelope>

    GetOCUserProfileResponse.xsl文件:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:include href="FaultResponse.xsl"/>
    <xsl:template match="/">
    <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
        <title>MyProfile</title>
    </head>

    <body id="bodyContainer" bgcolor="#cccccc">
    <xsl:apply-templates select="SOAP:Envelope/SOAP:Body/GetOCUserProfileResponse"/>
    <xsl:apply-templates select="SOAP:Envelope/SOAP:Body/SOAP:Fault"/>
    </body>
    </html>
    </xsl:template>
    <xsl:template match="GetOCUserProfileResponse">
    <table width="600" border="1" align="center" cellpadding="5" cellspacing="1">
        <tr>
            <td width="120" align="right">Name:</td>
            <td>
                    <xsl:element name="input">
                        <xsl:attribute name="id">Name</xsl:attribute>
                        <xsl:attribute name="value"><xsl:value-of select="Name"/></xsl:attribute>
                    </xsl:element>
            </td>
            <td width="120" align="right">CommunityName:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">CommunityName</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="CommunityName"/></xsl:attribute>
                </xsl:element>
            </td>
        </tr>
        <tr>
            <td width="120" align="right">Gender:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">Gender</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="Gender"/></xsl:attribute>
                </xsl:element>
            </td>
            <td width="120" align="right">Age:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">Age</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="Age"/></xsl:attribute>
                </xsl:element>
            </td>
        </tr>
        <tr>
            <td width="120" align="right">MartalStatus:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">MartalStatus</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="MartalStatus"/></xsl:attribute>
                </xsl:element>
            </td>
            <td width="120" align="right">Country:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">Country</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="Country"/></xsl:attribute>
                </xsl:element>
            </td>
        </tr>
        <tr>
            <td width="120" align="right">State:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">State</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="State"/></xsl:attribute>
                </xsl:element>
            </td>
            <td width="120" align="right">City:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">City</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="City"/></xsl:attribute>
                </xsl:element>
            </td>
        </tr>
        <tr>
            <td width="120" align="right">Address:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">Address</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="Address"/></xsl:attribute>
                </xsl:element>
            </td>
            <td width="120" align="right">Zipcode:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">Zipcode</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="Zipcode"/></xsl:attribute>
                </xsl:element>
            </td>
        </tr>
        <tr>
            <td width="120" align="right">Email:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">Email</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="Email"/></xsl:attribute>
                </xsl:element>
            </td>
            <td width="120" align="right">Title:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">Title</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="Title"/></xsl:attribute>
                </xsl:element>
            </td>
        </tr>
        <tr>
            <td width="120" align="right">Company:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">Company</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="Company"/></xsl:attribute>
                </xsl:element>
            </td>
            <td width="120" align="right">Timezone:</td>
            <td>
                <xsl:element name="input">
                    <xsl:attribute name="id">Timezone</xsl:attribute>
                    <xsl:attribute name="value"><xsl:value-of select="Timezone"/></xsl:attribute>
                </xsl:element>
            </td>
        </tr>
    </table>
    <br></br>
    <form name="form" method="post" action="/test/testServlet">
    <input type="hidden" name="XML" />
    </form>
    <p align="center"><input type="button" value="Update" onclick="onUpdate()" /></p>
    </xsl:template>
    </xsl:stylesheet>

    FaultResponse.xsl文件:

    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="SOAP:Fault">
    <table width="600" border="1" align="center" cellpadding="5" cellspacing="1">
        <tr>
            <td width="120" align="right">Error code : </td>
            <td>
                <xsl:value-of select="faultcode"/>
            </td>
            <td width="120" align="right">Error message : </td>
            <td>
                <xsl:value-of select="faultstring"/>
            </td>
        </tr>
    </table>
    </xsl:template>
    </xsl:stylesheet>


       收藏   分享  
    顶(0)
      




    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2005/4/8 14:42:00
     
     doubleG 帅哥哟,离线,有人找我吗?
      
      
      威望:7
      等级:大三(面向对象是个好东东!)
      文章:591
      积分:4119
      门派:XML.ORG.CN
      注册:2004/5/27

    姓名:(无权查看)
    城市:(无权查看)
    院校:(无权查看)
    给doubleG发送一个短消息 把doubleG加入好友 查看doubleG的个人资料 搜索doubleG在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 引用回复这个贴子 回复这个贴子 查看doubleG的博客2
    发贴心情 
    xmlns:SOAP="http://www.w3.org/2001/12/soap-envelop"把这个在XSL中也声明了就好了。
    点击查看用户来源及管理<br>发贴IP:*.*.*.* 2005/4/8 14:55:00
     
     GoogleAdSense
      
      
      等级:大一新生
      文章:1
      积分:50
      门派:无门无派
      院校:未填写
      注册:2007-01-01
    给Google AdSense发送一个短消息 把Google AdSense加入好友 查看Google AdSense的个人资料 搜索Google AdSense在『 XSL/XSLT/XSL-FO/CSS 』的所有贴子 访问Google AdSense的主页 引用回复这个贴子 回复这个贴子 查看Google AdSense的博客广告
    2026/1/1 4:08:14

    本主题贴数2,分页: [1]

    管理选项修改tag | 锁定 | 解锁 | 提升 | 删除 | 移动 | 固顶 | 总固顶 | 奖励 | 惩罚 | 发布公告
    W3C Contributing Supporter! W 3 C h i n a ( since 2003 ) 旗 下 站 点
    苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
    266.602ms