[XOM-interest] entity in attribute value
Michael Kay
mike at saxonica.com
Tue Jan 13 14:52:39 EST 2009
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="€"/>
>
> 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
More information about the XOM-interest
mailing list