Thanks Neeraj for your valuable input... Can I declare schema in instance document... like...
<package name="demopack"> <message> .... </message> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"> ..... </xsd:schema> </package> If it allows.. Can I parse this block of schema. Thanks, Sridhar. -----Original Message----- From: Neeraj Bajaj [mailto:[EMAIL PROTECTED] Sent: Wednesday, November 21, 2001 6:14 PM To: [EMAIL PROTECTED] Subject: RE: Facing problem... Hi Sridhar, > I am sending XMLSchema.xsd as attachment... > If it is wrong can you please send me the right XMLSchema.xsd So ur XMLSchema.xsd is SchemaForSchema. U dont need to import in ur schema file for 'element' , 'annotation', 'complexType' etc. they are called Schema Component defined by W3C SchemaSpec and are building blocks that comprise the abstract data model of the schema. All these Schema Symbols fall under the namespace "http://www.w3.org/2001/XMLSchema". Any parser compliant with W3C Schema Specification knows about the XML Schema Language types, elements , attributes, groups etc.. However, if u want to use the same name of element as "element", u can use it but it should be in different namespace than "http://www.w3.org/2001/XMLSchema". Now about ur problem, > > <xsd:element ref="xsd:element"/> > > <xsd:element ref="xsd:complexType"/> ^^^^^^^^^^^ it's not clear what u want to do here, 1. if u want to refer to another element declaration of ur own, u should do something like <xsd:element name = "foo" type ="xsd:string"/> <xsd:element ref=" (prefix for targetNamespace):foo "/> 2. if u want the type of given element same as 'complex type' then declare ur complex type <xsd:complexType name = "foo"> ..... ..... </xsd:complexType> <xsd:element name = "foo" type = " (prefix for targetNamespace):foo "/> There are some constraints on the usage of name, ref, type etc.. look at following URL http://www.w3.org/TR/xmlschema-1/#section-Constraints-on-XML-Representat ions-of-Element-Decl arations hope that helps, -- Neeraj Bajaj Sun Microsystems, inc. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
