• 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:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Ron McLeod
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Frames in XML

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,
I want to use frames in my XML.Actually the frame content is set in a request attribute.
I want to display a frame in an XML using XSLT.Has anyone done something like this.

I have a report which is displayed in XML format using a XSLT.
I want to add a image in a frame at the top of this XML file.
How can I add a frame to an XSLT.
The frame will contain a map object.The url of the map object will be set in a request attribute.

Can anyone give me a suggestion as to how to include a frame in an XSLT.

Thanks in advance...
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can't use "frames" in XML. That's purely an HTML concept.
In other words, you first need to figure out what kind of HTML files you want to generate,and then figure out what kind of XSLT stylesheets you need to transform your XML document into those HTML files.
 
adrian mills
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OK how can I use an image whose location is a URL on the web?
This image is dynamically fetched from the web..
 
Bartender
Posts: 10336
Hibernate Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As you normally would in HTML (I'm assuming this is the destination format since you mention frames) - with an <img /> tag where the src attribute is the URL of that image.
 
adrian mills
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi ,
My XML is something like this

<MapImage>
<Source>url</Source>
</MapImage>


I am using the following XSL
<img width="350" height="350">
<xsl:attribute name="src"><xsl:value-of select="Source"/></xsl:attribute>
</img>


But the image doesnot get displayed.
When I do a view source
I get <img height="350" width="350" src=""/>
The url is not replaced can some one tell me where I am going wrong?

Thanks a lot to all who have replied till now.
Hope to get u r cooperation ..
 
author and deputy
Posts: 3150
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try,.

<img width="350" height="350">
<xsl:attribute name="src"><xsl:value-of select="//*/Source"/></xsl:attribute>
</img>
or
<img width="350" height="350">
<xsl:attribute name="src"><xsl:value-of select="MapImage/Source"/></xsl:attribute>
</img>
or
<img width="350" height="350">
<xsl:attribute name="src"><xsl:value-of select="./Source"/></xsl:attribute>
</img>

its all depends on how you call the template and from what node.

Check this xpath/xsl tutorial from http://www.w3cshools.com , pretty good.
 
adrian mills
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks a lot Balaji the first option has worked.I have not yet figured why?
I will try as of now I had to get it started working.
Thanks a lot for your help.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic