错误Document is invalid: no grammar found
是说你的命名空间错误,你看看
xmlns:xsd="http://www.w3.org/2001/XMLSchema"有没有写错
标点符号都不能错的

解决方案 »

  1.   

    第一个问题就不说   改用dtd了 
    还有 在xsl里定义个参数,然后用户作出不同的选择就向xsl文件中传递不同的参数 然后就可以动态的有选择的显示xml的内容  这能实现吗?--就是怎样向xsl文件传递参数(dom4j中有这样的功能吗?)这两个问题呢 ?
      

  2.   

    脚本中使用 msdom组件  能实现向xslt样式表文件 传递参数的功能吗????????????
      

  3.   

    两处错误
    1,<xsd:complexType name="type">  
           <xsd:restriction base="xsd:string">
    应该是simpleType, complexType下不能包含restriction 
    2,<xsd:element name="item" type="item" maxOccurs="nobouded">      
    拼写错误 nobouded -> unbounded第一个问题,你把你的XML解析器设置好支持XSD了吗?
      

  4.   

    xmlns:xsd="http://www.w3.org/2001/XMLSchema"有没有写错
    标点符号都不能错的
      

  5.   

    对于xsl来说输入就是xml文件, 根据xml文件的内容的不同,在xsl内进行区分,不行吗?
      

  6.   

    那些都不说了  脚本中使用 msdom组件  能实现向xslt样式表文件 传递参数的功能吗????????????
      

  7.   

    complexType下不能包含restriction ???3.2.1.2 Restriction
    Restriction is very easy to understand. You simply redefine or omit those elements and attributes that change, and list all the other elements and attributes exactly as they were in the base type. For example, we can create a USAddress type that omits the city and state elements, as shown in Listing 3-23. (If you have a zip code you don't need a city and state, because any zip code can be cross-referenced to a specific city and state.)Listing 3-23 An Extension of the USAddress Type Defined in Listing 3-21
    <complexType name="BriefUSAddress">
      <complexContent>
        <restriction base="mh:USAddress">
          <sequence>
            <element name="name" type="string"/>
            <element name="street" type="string"/>
            <element name="zip" type="string"/>
          </sequence>
          <attribute name="category" type="string" default="business"/>
        </restriction>
      </complexContent>
    </complexType>-----------------
    J2EE&#8482; Web Services 
    By Richard Monson-Haefel 
       
    Publisher : Addison Wesley 
    Pub Date : October 24, 2003 
    ISBN : 0-321-14618-2 
    Pages : 928 
      

  8.   

    楼主没有搞清楚complexType 和simpleType的区别,建议看看
    XML Schema
    Eric van der Vlist
    Publisher: O'Reilly
    First Edition June 2002 ISBN: 0-596-00252-1, 400 pages