Re: Unqualified elment - but still have prefix at the root

Attached files as ZIP 



Avihaimar wrote:
> 
> Exampel :  lib.xsd import book.xsd (both with unqualified)
> 
> ------   LIB -------
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns="http://www.library.org" xmlns:b="http://www.book.org"
> targetNamespace="http://www.library.org" elementFormDefault="unqualified"
> attributeFormDefault="unqualified">
> 	<xs:import namespace="http://www.book.org" schemaLocation="Book.xsd"/>
> 	<xs:element name="Library" type="Library"/>
> 	<xs:complexType name="Library">
> 		<xs:sequence>
> 			<xs:element name="BookCatalogue">
> 				<xs:complexType>
> 					<xs:sequence>
> 						<xs:element name="test" type="b:BookType" maxOccurs="unbounded"/>
> 					</xs:sequence>
> 				</xs:complexType>
> 			</xs:element>
> 		</xs:sequence>
> 	</xs:complexType>
> </xs:schema>
> 
> 
> 
> ---------------------   Book  --------------
> <?xml version="1.0"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns="http://www.book.org" targetNamespace="http://www.book.org"
> elementFormDefault="unqualified" attributeFormDefault="unqualified">
> 	<xs:complexType name="BookType">
> 		<xs:sequence>
> 			<xs:element name="Title" type="xs:string"/>
> 		</xs:sequence>
> 	</xs:complexType>
> </xs:schema>
> 
> 
> 
> When i generate xml in xmlspy i get the following xml (with n1 prefix ,
> but i dont want prefix!!!!)
> 
> ------------------------ XML -------------------
> <?xml version="1.0" encoding="UTF-8"?>
> <!--Sample XML file generated by XMLSpy v2008 sp1
> (http://www.altova.com)-->
> <n1:Library xsi:schemaLocation="http://www.library.org lib.xsd"
> xmlns:n1="http://www.library.org"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> 	<BookCatalogue>
> 		<test>
> 			<Title>String</Title>
> 		</test>
> 	</BookCatalogue>
> </n1:Library>
> 
> 
> 
> 
> Thank you!!!!!!
> 
http://www.nabble.com/file/p25132253/xsd.zip xsd.zip 
-- 
View this message in context: http://www.nabble.com/Unqualified-elment---but-still-have-prefix-at-the-root-tp25123070p25132253.html
Sent from the w3.org - xmlschema-dev mailing list archive at Nabble.com.

Received on Tuesday, 25 August 2009 10:57:19 UTC