[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Namespace and Schema


gabriela perez
Your code is written in a language I am unfamiliar with, so I can't help you
with that.

But surely you don't want to create a MessageFile element in the XML Schema
namespace? Apart from being very confusing, it's considered bad form to add
names to namespaces owned by someone else.

Michael Kay
http://www.saxonica.com/

 

> -----Original Message-----
> From: Gabriela Perez [mailto:gabyp@p...] 
> Sent: 23 September 2004 21:59
> To: xml-dev@l...
> Subject:  Namespace and Schema
> 
> Can anyone help me, please?
> I am creating a dynamic XML doc. I should generate the following out:
> 
> <?xml  version="1.0" ?>
> <MessageFile  xmlns="http://www.w3.org/2001/XMLSchema"
> targetNamespace="http://www.mysite.com/Message"
> xmlns:Message="http://www.mysite.com/Message">
> 
> I have tried to implement it in different way, but they are 
> not working.. but I don't understand why.
> 
> I tried this:
> DOM_DOMImplementation     implDoc;
> DOM_Document  Document = implDoc.createDocument( 
> XMLString::transcode("http://www.w3.org/2001/XMLSchema"),
>                              
> XMLString::transcode("xmlns:Message") ,0x00);
> 
> Also I tried this:
> DOM_Document  Document = DOM_Document::createDocument();
> DOM_Element  Root = 
> Document.createElementNS(XMLString::transcode("http://www.w3.o
> rg/2001/XMLSchema"),
>                                           
> XMLString::transcode("xmlns:Message"));
> Document.appendChild(Root);
> 
> It is failing this error:   Signal SIGABRT raised (abnormal 
> termination).
> I know that Root isn't  Node, but if I create element without 
> NS, it works.
> My idea here was that When I try to get that information to 
> show it I will call getAttributes, but I think that is wrong 
> because I don't set that attributes.
> 
> I am confused about Namespace and URI, I understand that 
> namespace could be a prefix, it could be linked to namespace, 
> in my case it is "Message". The  URI is 
> http://www.w3.org/2001/XMLSchema. I am not sure if it is 
> correct. Also If I should implement it in some way I wrote above.
> I can use until DOM  Level 2.0 Core Specification.  ( XML4C - 
> ( DOM 1.0, DOM 2.0. SAX 1.0, SAX 2.0, Namespaces, and W3C's 
> XML Schema recommendation version 1.0.)
> 
> I hope someone can help me!
> 
> Thank you very much! 
> 
> -- 
> _______________________________________________
> http://mail.mexico.com
> ¡Disponible Ya! Utiliza el Outlook y Outlook Express para 
> bajar tus correos por solo US$24.95 al año
> 
> Now available! Download your mail into your computer with 
> Outlook and Outlook Express US$24.95/yr
> 
> Powered by www.M3xico.com
> 
> -----------------------------------------------------------------
> The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
> initiative of OASIS <http://www.oasis-open.org>
> 
> The list archives are at http://lists.xml.org/archives/xml-dev/
> 
> To subscribe or unsubscribe from this list use the subscription
> manager: <http://www.oasis-open.org/mlmanage/index.php>
> 
> 


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.