XSLT招聘问题! - 名称空间

1<contactinfo xmlns="http://www.microsoft.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.microsoft.com   
2AnnotatedSchema.xsd">
3<personname>
4<givenname>John</givenname>
5<familyname>Zhang</familyname>
6</personname>
7</contactinfo>

请把以上的XML中的内容(这里简单化,也就是PersonName)显示出来,在IE6下写一个XSLT显示。
我把

 1<contactinfo xmlns="http://www.microsoft.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemalocation="http://www.microsoft.com   
 2AnnotatedSchema.xsd">中的ContactInfo后面的东西去掉才能正常显示,否则默认显示,能给出完整并做了实验的XSLT文件,给大分!!!   
 3  
 4\---------------------------------------------------------------   
 5  
 6try   
 7  
 8<xsl:stylesheet version="1.0" xmlns:cc="http://www.microsoft.com" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 9<xsl:template match="/">
10<html>
11<body>
12<xsl:apply-templates></xsl:apply-templates>
13</body>
14</html>
15</xsl:template>
16<xsl:template match="cc:ContactInfo">
17<xsl:apply-templates></xsl:apply-templates>
18</xsl:template>
19<xsl:template match="cc:PersonName">
20<xsl:value-of select="cc:GivenName"></xsl:value-of>...<xsl:value-of select="cc:FamilyName"></xsl:value-of>
21</xsl:template>
22</xsl:stylesheet></contactinfo>
Published At
Categories with Web编程
comments powered by Disqus