Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] entity in attribute value

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: "Michael Kay" <mike AT saxonica.com>
  • To: "'Luca Passani'" <passani AT eunet.no>, "'xom-interest'" <xom-interest AT lists.ibiblio.org>
  • Subject: Re: [XOM-interest] entity in attribute value
  • Date: Tue, 13 Jan 2009 19:52:39 -0000

Not sure why you are asking a basic XML question on a XOM list.

Yes, it is a well-known fact that XML does not have any predefined entities
other than the standard lt, gt, amp, quot, apos. If you want to use other
entities you have to declare them. That seems a simple enough rule.

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


> -----Original Message-----
> From: xom-interest-bounces AT lists.ibiblio.org
> [mailto:xom-interest-bounces AT lists.ibiblio.org] On Behalf Of
> Luca Passani
> Sent: 12 January 2009 11:35
> To: xom-interest
> Subject: [XOM-interest] entity in attribute value
>
>
> Hi, I just figured that XML is touchy about using entities in
> attribute value even for super-simple XML files with no DTD:
>
> <capability name="entity_euro" value="&euro;"/>
>
> Caused by: org.xml.sax.SAXParseException: The entity "euro"
> was referenced, but not declared.
> at
> org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.j
> ava:1189)
> at nu.xom.Builder.build(Builder.java:1127)
>
>
> is there a standard way to escape entities in XML?
>
> who said that XML was simple? it is horrendously gotcha-ridden....
>
> Thanks
>
> Luca
>
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest





Archive powered by MHonArc 2.6.24.

Top of Page