Jump to content

Recommended Posts

Posted

Does anyone know how I can transform the tag <euro> into € with XSL? I tried to use € but that gives me an error. :)

Posted

That's because entities must be declared with a DTD in the XSLT. Add this in the XSLT right after the XML prolog:

<!DOCTYPE xsl:stylesheet  [	<!ENTITY nbsp   " ">	<!ENTITY copy   "©">	<!ENTITY reg    "®">	<!ENTITY trade  "™">	<!ENTITY mdash  "—">	<!ENTITY ldquo  "“">	<!ENTITY rdquo  "”"> 	<!ENTITY pound  "£">	<!ENTITY yen    "¥">	<!ENTITY euro   "€">]>

As you can see, there are also other popular entities declared here. You may declare your own entities as well.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...