Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » getHREF of org.eclipse.emf.ecore.xmi.XMLHelper doesn't encode '&' in element name(Encoding of '&' in element name doesn't occur when passed to getHREF function in org.eclipse.emf.ecore.xmi.XMLHelper )
getHREF of org.eclipse.emf.ecore.xmi.XMLHelper doesn't encode '&' in element name [message #1039834] Fri, 12 April 2013 17:02 Go to next message
Badri narayan is currently offline Badri narayanFriend
Messages: 7
Registered: April 2013
Junior Member
getHREF function of org.eclipse.emf.ecore.xmi.XMLHelper doesn't encode '&' in element name.

When an element with name like 'A & B' is passed to getHREF of org.eclipse.emf.ecore.xmi.XMLHelper, the string that is returned is something like '<path>/A%20&%20B?', but ideally it should have been something like
'<path>/A%20%26%20B?' ('&' encoded to %26). Is this an emf bug or the expected behavior?
Re: getHREF of org.eclipse.emf.ecore.xmi.XMLHelper doesn't encode '&amp;' in element name [message #1040197 is a reply to message #1039834] Sat, 13 April 2013 06:43 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33108
Registered: July 2009
Senior Member
Badri,

Yes, unless you have OPTION_SKIP_ESCAPE_URI mapped to false, no attempt
is made to encode the hrefs. Of course URIs themselves are generally
already encoded when you construct them and use them for resources in
the resource set, so it's not clear why you have unencoded URIs.

On 12/04/2013 7:05 PM, Badri narayan wrote:
> getHREF function of org.eclipse.emf.ecore.xmi.XMLHelper doesn't encode
> '&' in element name.
>
> When an element with name like 'A & B' is passed to getHREF of
> org.eclipse.emf.ecore.xmi.XMLHelper, the string that is returned is
> something like '<path>/A%20&%20B?', but ideally it should have been
> something like '<path>/A%20%26%20B?' ('&' encoded to %26). Is this an
> emf bug or the expected behavior?


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[xsd2ecore] defaultValueLiteral issue with required strings
Next Topic:Problem with emf entity icons
Goto Forum:
  


Current Time: Tue Mar 19 10:36:20 GMT 2024

Powered by FUDForum. Page generated in 0.02655 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top