• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Entity not getting resolved in XSL

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am converting HTML to XML using XSLT. The HTML may contain special characters like euro, copyright, mdash etc. In order to process them I declared entities in my XSL

But I receive The entity "mdash" was referenced, but not declared exception while performing XSLT over my html. Am i missing something here?
Thanks,
Kapil
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So you said "When these entities occur in my stylesheet, translate them in this way." But that has no effect on the entities that were in the document you wanted to transform.

I suggest you preprocess your document which is not XML using JTidy or Tagsoup and make it into XML. Then you should have no problem.
 
kapil Gupta
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks for your reply Paul.
The HTML is XHTML compliant so I think there is no need to convert it into XML. Sorry I didn't understand your statement that by converting html to XML will solve the issue.
Regards,
Kapil
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic