JKI Discussion Forums
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Problem with Hash (#) in name

#1
User is offline   Bob Schor 

  • Group: Members
  • Posts: 35
  • Joined: 11-May 08
I have a cluster with an element called "Trial #". According to the "rules" of XML, all 7 characters are valid. According to the "rules" of EasyXML, the space character should be converted to an underscore. Thus I expect the EasyXML code to have a tag that looks like <Trial_#>, but instead, I get <Trial_>, missing the Hash character. I know that this character can have another meaning as a "numeric indicator", i.e. something like "Ӓ" (I think this form is called a numeric character reference, and I think this allows you, in XML, to "encode" any old character by writing its decimal value).

Is omitting the "#" in EasyXML a Bug or a Feature? [Haven't experimented with other characters, but have seen references here to the colon character -- is it Treasure Hunt time?]
0 kudos

#2
User is offline   Jim Kring 

  • Group: JKI Team
  • Posts: 1,204
  • Joined: 15-March 06

View PostBob Schor, on Apr 26 2009, 10:29 PM, said:

I have a cluster with an element called "Trial #". According to the "rules" of XML, all 7 characters are valid. According to the "rules" of EasyXML, the space character should be converted to an underscore. Thus I expect the EasyXML code to have a tag that looks like <Trial_#>, but instead, I get <Trial_>, missing the Hash character. I know that this character can have another meaning as a "numeric indicator", i.e. something like "Ӓ" (I think this form is called a numeric character reference, and I think this allows you, in XML, to "encode" any old character by writing its decimal value).

Is omitting the "#" in EasyXML a Bug or a Feature? [Haven't experimented with other characters, but have seen references here to the colon character -- is it Treasure Hunt time?]


Hi Bob,

The # character cannot be used in XML names, according to the specification, here:

http://www.w3.org/TR...#sec-common-syn

As such, EasyXML will delete it from names.

Of course, interpreting the XML specification can be a bit of a "treasure hunt", unless you have a really good understanding of regular expressions :)

Thanks,

-Jim
0 kudos

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic