Results 1 to 6 of 6

Thread: XSLT write   [resolved]

  1. #1

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141

    XSLT write   [resolved]

    I am such an XML XSL noob. I am trying to write out & nbsp; (no space between the & and n, but the board keeps making it a real blank space) when an element named value is empty. I am doing it like this,
    PHP Code:
    <xsl:when test="string-length(value)=0">
         &
    nbsp;
    </
    xsl:when
    but I get an error saying "Reference to undefined entity 'nbsp'"
    Last edited by blindlizard; Jul 8th, 2004 at 02:48 PM.
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  2. #2

    Thread Starter
    Frenzied Member blindlizard's Avatar
    Join Date
    Feb 2001
    Location
    Austin, TX - United States of America
    Posts
    1,141
    PHP Code:
    I found the answeryou have to use &#160; insted of &nbsp; in XSLT 
    I drink to make other people more interesting!
    [vbcode]On Error GoTo Bar[/vbcode]
    http://www.monsterlizard.com

  3. #3

  4. #4
    Fanatic Member riis's Avatar
    Join Date
    Nov 2001
    Posts
    551
    The W3C XSL (Extensible Stylesheet Language) standard consists of two actual standards.
    1) XSLT (the T means "transformation"), with which you can transform the structure of an XML file in some other XML file (or just ASCII).
    2) XSL-FO (the FO means "formatting objects"), which is a page description language. The Apache FOP project is an open source project with which you can convert a FO-document into PDF (and other formats). FO unfortunately never really took off (at least I hardly know any implementations, except FOP).

    So, when you mean the XSL transformations, it's better to refer to XSLT, instead of XSL (the entire standard).

  5. #5

  6. #6
    Fanatic Member riis's Avatar
    Join Date
    Nov 2001
    Posts
    551
    An XSLT-file usually has the extension .xsl, so I guess it is so.
    BTW, what do you mean with "Adding XSLT to your web project"? Include one in an XML file, so the content of it will be shown as HTML?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width