Search

I'm getting the following error with a soft-hyphen (­) in an entry:

Line 18 loadXML(): Entity 'shy' not defined in Entity, line: 18

It's only with the soft-hyphen, & or e.g. — or similar makes no problem. An idea how this can be solved?

that's b/c xslt only recognizes 5 html entities by default, but i can only remember these three: &, >, <. Otherwise you can use the entity unicode value (as you have referenced), create a dtd file with references to your entities, or put that dtd information into your actual stylesheet. I've still had no success with doing the latter two so I always just stick with using the hex value.

here's a source you can read up on about entities:

http://www.dpawson.co.uk/xsl/sect2/N3573.html

Thanks wtdtan for your fast help. After searching and reading what you've mentioned I also decided to try the numerical HTML encoding of the Unicode character (hexadecimal) and it seems to work just fine (i.e. ­ for the soft-hyphen).

Here's a very nice character table:

http://www.utf8-chartable.de/

Here's another cool XHTML Character Encoding site, http://www.digitalmediaminute.com/reference/entity/index.php

I might be wrong, but I believe I’ve had success doing entities like → and such like this:

 <xsl:text disable-output-escaping="yes">&amp;rarr;</xsl:text>

@bzerangue : Thanks for the link! It's much easier to use than the other one I had bookmarked and will come in handy.

If you're on a Mac then I thoroughly recommend this dashboard widget: HTML Entity Character Lookup

@czheng: I thought that I've tried this, cause I handled it this way in the past. But it seems that I was buffled and a bit disarranged that time. °_°

In the meantime I feel like an egghead.

Following: How can I use the soft-hyphen in the title field to not get a handle like 'something-shy-else' ? Or am I still clouded… dang.

Hm, thanks. It does the job well, but it interprets the soft-hyphen not soft enough. If the word should be something it interprets it as some-thing. Seems that I've to write some extra xsl instead. Or…

Create an account or sign in to comment.

Symphony • Open Source XSLT CMS

Server Requirements

  • PHP 5.3-5.6 or 7.0-7.3
  • PHP's LibXML module, with the XSLT extension enabled (--with-xsl)
  • MySQL 5.5 or above
  • An Apache or Litespeed webserver
  • Apache's mod_rewrite module or equivalent

Compatible Hosts

Sign in

Login details