Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

declare element and ATTRIBUTES with NameSpace in the Schema

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
hi!
how can i declare namespace in the XDR-SCHEMA. for example:
i have this xml document:
___________________________________________________________
<?xml version=&quot;1.0&quot;?>
<products xmlns=&quot;x-schema:#myscm&quot; xmlns:mall=&quot; xmlns:prod=&quot;<Schema name=&quot;myscm&quot; xmlns=&quot;urn:schemas-microsoft-com:xml-data&quot; xmlns:dt=&quot;urn:schemas-microsoft-com:datatypes&quot;>
<ElementType name=&quot;products&quot; content=&quot;eltOnly&quot;>
<element type=&quot;mall:info&quot;/>
<element type=&quot;product&quot;/>
</ElementType>
<ElementType name=&quot;product&quot; content=&quot;eltOnly&quot;>
<element type=&quot;name&quot;/>
<element type=&quot;prod:info&quot;/>
</ElementType>
<ElementType name=&quot;name&quot; content=&quot;textOnly&quot;/>
<ElementType name=&quot;prod:info&quot; content=&quot;textOnly&quot;/>
<ElementType name=&quot;mall:info&quot; content=&quot;textOnly&quot;/>

</Schema>
<mall:info>mall products</mall:info>
<product>
<name>washer machine</name>
<prod:info>bal blabla bla</prod:info>
</product>
<product>
<name>vax</name>
<prod:info>sssuuuuuuuuppppppeeeernnn</prod:info>
</product>
<product>
<name>homni bos</name>
<prod:info>koko perfum</prod:info>
</product>
<product>
<name>momolada</name>
<prod:info>hala ice cream</prod:info>
</product>
</products>
__________________________________________________________

but in any time i run this on my browser there is an error say:
_____________________________________________________
&quot;A namespace was found but not supported at current location. Error processing resource 'file:///C:/Inetpub/ Line 13, Position 51


<ElementType name=&quot;prod:info&quot; content=&quot;textOnly&quot;/>
&quot;
______________________________________________________-

i had try to declare the namespaces in the schema like this:
______________________________________________________-
<?xml version=&quot;1.0&quot;?>
<products xmlns=&quot;x-schema:#myscm&quot; xmlns:mall=&quot; xmlns:prod=&quot;<Schema name=&quot;myscm&quot; xmlns=&quot;urn:schemas-microsoft-com:xml-data&quot; xmlns:dt=&quot;urn:schemas-microsoft-com:datatypes&quot;>
<ElementType name=&quot;products&quot; content=&quot;eltOnly&quot;>
<element type=&quot;mall:info&quot; xmlns:mall=&quot; <element type=&quot;product&quot;/>
</ElementType>
<ElementType name=&quot;product&quot; content=&quot;eltOnly&quot;>
<element type=&quot;name&quot;/>
<element type=&quot;prod:info&quot; xmlns:prod=&quot;</ElementType>
<ElementType name=&quot;name&quot; content=&quot;textOnly&quot;/>
<ElementType name=&quot;prod:info&quot; content=&quot;textOnly&quot; xmlns:prod=&quot;<ElementType name=&quot;mall:info&quot; content=&quot;textOnly&quot; xmlns:mall=&quot;
</Schema>
<mall:info>mall products</mall:info>
<product>
<name>washer machine</name>
<prod:info>bal blabla bla</prod:info>
</product>
<product>
<name>vax</name>
<prod:info>sssuuuuuuuuppppppeeeernnn</prod:info>
</product>
<product>
<name>homni bos</name>
<prod:info>koko perfum</prod:info>
</product>
<product>
<name>momolada</name>
<prod:info>hala ice cream</prod:info>
</product>
</products>
________________________________________________________
but the error is still there

pleasssss hhhheeeellllpppp!!! :)
thank you!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top