We help IT Professionals succeed at work.
Get Started

How do I format, in XSLT, an XML tag that contains both HTML and my own XML markup?

Last Modified: 2013-11-19
I'm a complete beginner to XSL so bear with me!...

I have the following XML (in short):

      <sec_title>Case discussion</sec_title>
            <p><i>html and text here...</i></p>            
                  <figtitle>Title of figure 1</figtitle>
                  <copyright>&#169; 2004 Copyright Line</copyright>
            <p>more html and text here...</p>
            <p>and some more html and text here...</p>
                  <figtitle>Title of figure 2</figtitle>
                  <copyright>&#169; 2004 Copyright Line</copyright>


The question is...

How do I get the XSLT to render:

1) the HTML within the <bodytext> tag.  This must format the text in bold, italics and insert paragraphs where appropriate.

2) the <fig> tags within the <bodytext> tag.  The aim here is to parse the filename within the <graphic> tag into an <img> tag.
I know that this can be done by using an AVT such as: <img src='{bodytext/fig/graphic}'/> but I am having trouble getting the XSLT to display the image in the correct postition within the text

Any help would be much appreciated!

Watch Question
This problem has been solved!
Unlock 1 Answer and 7 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE