以文本方式查看主题 - 中文XML论坛 - 专业的XML技术讨论区 (http://bbs.xml.org.cn/index.asp) -- 『 XQuery/XLink/XPointer/ 』 (http://bbs.xml.org.cn/list.asp?boardid=14) ---- 请问一个关于XSLT的简单问题~~~急救啊~~~~~ (http://bbs.xml.org.cn/dispbbs.asp?boardid=14&rootid=&id=10850) |
-- 作者:shadow7788 -- 发布时间:10/9/2004 11:09:00 PM -- 请问一个关于XSLT的简单问题~~~急救啊~~~~~ 我的XML <?xml version="1.0" encoding="utf-8" ?> <xs:schema id="ProductS" targetNamespace="http://tempuri.org/ProductS.xsd" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns="http://tempuri.org/ProductS.xsd" xmlns:mstns="http://tempuri.org/ProductS.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> <xs:element name="ProductS" msdata:IsDataSet="true"> <xs:complexType> <xs:choice maxOccurs="unbounded"> ![]() ![]() ![]() <xs:element name="Product"> <xs:complexType> <xs:sequence> <xs:element name="ProductID" msdata:ReadOnly="true" msdata:AutoIncrement="true" type="xs:int" /> <xs:element name="CartegoryID" type="xs:int" minOccurs="0" /> <xs:element name="ProviderID" type="xs:int" minOccurs="0" /> <xs:element name="ProductName" type="xs:string" minOccurs="0" /> <xs:element name="Keyword" type="xs:string" minOccurs="0" /> <xs:element name="Description" type="xs:string" minOccurs="0" /> <xs:element name="Img" type="xs:base64Binary" minOccurs="0" /> <xs:element name="Attachment" type="xs:base64Binary" minOccurs="0" /> <xs:element name="QuotePrice" type="xs:decimal" minOccurs="0" /> <xs:element name="ActPrice" type="xs:decimal" minOccurs="0" /> <xs:element name="flag" type="xs:int" minOccurs="0" /> </xs:sequence> </xs:complexType> </xs:element> </xs:choice> </xs:complexType> <xs:unique name="ProductSKey1" msdata:PrimaryKey="true"> <xs:selector xpath=".//mstns:Product" /> <xs:field xpath="mstns:ProductID" /> </xs:unique> </xs:element> </xs:schema> 可是type 获得不了,不知道那里错了~~~~~~~~~~~ |
-- 作者:doubleG -- 发布时间:10/11/2004 10:16:00 AM -- 在xsl中你也要把所要处理的名称空间标明,然后在所处理的元素也要加上前缀,如下: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/> <xsl:template match="/"> <xsl:for-each select="//xs:element/*/xs:sequence//xs:element"> <xsl:value-of select="@type"></xsl:value-of> </xsl:for-each> </xsl:template> </xsl:stylesheet> |
W 3 C h i n a ( since 2003 ) 旗 下 站 点 苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》 |
7,151.123ms |