Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Sep 2002
    Posts
    70
    Thanks
    0
    Thanked 0 Times in 0 Posts

    how do create both image/text link in xsl..??

    how do create a image link in xsl..??
    for example, how to write a xsl that both accepts text and image from an input field and display it as an image link if image is inserted, else will display text link if text is inserted...??

  • #2
    New Coder
    Join Date
    Oct 2002
    Location
    Atlanta
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Since I am not familar with how your images are being stored, or how you plan on determining what's an image, verse just plain text - I'm flying kinda blind, but this is what I can offer up:

    Might be better off passing the return value from your INPUT element to a script that does an If...Exists on the file ( to see if it's a valid image ) and either inserts a <IMG> back into the document or straight text.

    Then you just need a <DIV> tag in your HTML that has an ID, you reference in your script and do a call to the DOM method innerHTML, to insert your value.

    Through XSL ... you might be able to work something out with <xsl:choose> statements, but again, since I do not know how your images are stored, I'm not certain how you'll validate the text is a valid image or just "text".

    If you can expand more on your situation, it might help.

    D.


  •  

    Posting Permissions

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