Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

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: 26377
81
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
 
The glass is neither half full or half empty. It is too big. But this tiny ad is just right:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic