Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
  • 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

XSLT , tool tip

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a scenario where in I need to display certain element with Tool tips in my HTML.

I have an input xml the contents of the tool tips are available in some of the fields of the xml .and I have an xsl file

I thought of using the title attribute. is this a good way or is there any other way.

If we can use the title attribute I am not sure how we can get the value dynamically in xsl.

For example

<td title=test><b>Sample</b></td>
I need this test value from a filed in xml .

Any help is highly appreciated
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Your example is not-well-formed xml!

Are you talking xhtml, or plain html?

You use xslt to transform from what to what? I am not clear!
 
Shruthi Babu
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have an xml and have an xslt file. I need to generate an html.


So I tranform from the xml file to html file.

I have a filed called description in my xml file. I need that as a tool tip in my html. How to achieve this?

Any help is highly appreciated.
 
Marshal
Posts: 28261
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
Yes, you're right, the "title" attribute is the one to use for an HTML tool-tip. But I don't understand the rest of the question. What's a "field" in an XML document? And why do you say "dynamically"? Perhaps an example of your XML and what you have so far in your XSLT would help.
 
Roseanne Zhang
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Q. How to ask an XSLT question?
A:
The easiest way to get answer real quick is post the original xml source, then post what you want to get the xml/html result. Of course, make it simple, and illustrate the point you want to solve only. Then your own approach which does not work as you desired. Many brain exercisers will solve your problem quickly. The answer will help others too.

http://bobcat.webappcabaret.net/javachina/faq/xslt_01.htm#xslt_Q00
reply
    Bookmark Topic Watch Topic
  • New Topic