[
Lists Home |
Date Index |
Thread Index
]
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@pormexico.com]
> Sent: 23 September 2004 21:59
> To: xml-dev@lists.xml.org
> Subject: [xml-dev] 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>
>
>
|