xmlbeans-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Friessen, Michelle" <michelle.fries...@pearson.com>
Subject Re: Namespaces
Date Wed, 16 Jul 2014 14:25:34 GMT
Using an empty string for the prefix in insertNamespace results in nothing
be printed out for that namespace.

Any other suggestions?

Thanks.

*Michelle Friessen*
Systems Product Support Analyst
Assessment & Instruction
Pearson
(319) 354-9200 x214687


On Wed, Jul 16, 2014 at 7:04 AM, Gagnon, Joseph - 0558 - MITLL <
Joseph.Gagnon@ll.mit.edu> wrote:

> I was able to achieve a prefix-less namespace attribute by passing an
> empty string for the prefix argument.
>
>
>
> E.g.  cursor.insertNamespace("", namespaceUri);
>
>
>
> *From:* Friessen, Michelle [mailto:michelle.friessen@pearson.com]
> *Sent:* Tuesday, July 15, 2014 4:38 PM
> *To:* user@xmlbeans.apache.org
> *Subject:* Namespaces
>
>
>
> We have 3 namespaces that need to be added when generating XML:
>
>
>
> xmlns="http://www.imsglobal.org/xsd/imsqti_v2p1"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>
> xsi:schemaLocation="http://www.imsglobal.org/xsd/imsqti_v2p1
> http://www.imsglobal.org/question/qtiv2p1pd2/xsd/imsqti_v2p1.xsd"
>
>
>
> Using XmlCursor, we were able to get the last 2 added using:
>
>
>
> cursor.insertAttributeWithValue("schemaLocation", "
> http://www.w3.org/2001/XMLSchema-instance", "
> http://www.imsglobal.org/xsd/imsqti_v2p1
> http://www.imsglobal.org/question/qtiv2p1pd2/xsd/imsqti_v2p1.xsd");
>
>
>
> However, we cannot successfully get the first one to print out.  We've
> tried variations of insertNamespace, insertAttribute and
> insertAttributeWithValue.  Does anyone have any suggestions on how to add a
> namespace without a prefix?
>
>
>
> Thanks.
>
>
> *Michelle Friessen*
>
> Systems Product Support Analyst
> Assessment & Instruction
> Pearson
>
> (319) 354-9200 x214687
>

Mime
View raw message