This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Heeeeeeeeelp


" I want to create a list of FAQ's with their respective anwers in XML.
They"


USE THIS XSL
<?xml version="1.0"?>
<HTML xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<BODY>
<TABLE BORDER="2">
<xsl:for-each select="FAQ_LIST/FAQ">
<TR><TD>Q:<a href="somelink.html"><xsl:value-of
select="QUESTION"/></a></TD></TR>
<TR><TD>A:<a href="somelink.html"><xsl:value-of
select="ANSWER"/></a></TD></TR>
</xsl:for-each>

</TABLE>
</BODY>
</HTML>


USE THIS XML
<?xml-stylesheet type="text/xsl" href="faq.xsl" ?>
<FAQ_LIST>
<FAQ>
<QUESTION Bookmark="1">This is the Question 1</QUESTION>
<ANSWER>This is the Answer 1</ANSWER>
</FAQ>
<FAQ>
<QUESTION Bookmark="2">This is the Question 2</QUESTION>
<ANSWER>This is the Answer 2</ANSWER>
</FAQ>
<FAQ>
<QUESTION Bookmark="3">This is the Question 3</QUESTION>
<ANSWER>This is the Answer 3</ANSWER>
</FAQ>
</FAQ_LIST>


You can strip out or replace any HTML tags in the XSL doc, as long as it
remains well formed (all tags closed, limit nesting tags). You can delete
the XSL ref in the XML doc if you are using another method of applying the
XSL.

Hope this helps.

-Hal

-----Original Message-----
From: Rohit Peyyeti [mailto:rohit@translogicsys.com]
Sent: Wednesday, August 02, 2000 9:31 AM
To: xsl-list@mulberrytech.com
Subject: Heeeeeeeeelp
Importance: High



Can anyone please help. I need some solution to this immediately as I have
to meet some urgent deadlines.

Any Idea how I can achieve this:

1) I want to create a list of FAQ's with their respective anwers in XML.
They
    appear like this in XML:

     <FAQ_LIST>
      <FAQ>
       <QUESTION Bookmark="1">This is the Question 1</QUESTION>
       <ANSWER>This is the Answer 1</ANSWER>
      </FAQ>
      <FAQ>
       <QUESTION Bookmark="2">This is the Question 2</QUESTION>
       <ANSWER>This is the Answer 2</ANSWER>
      </FAQ>
      <FAQ>
       <QUESTION Bookmark="3">This is the Question 3</QUESTION>
       <ANSWER>This is the Answer 3</ANSWER>
      </FAQ>
     </FAQ_LIST>

     This is how I like it should appear in the browser when I apply the
      XSL file:

      Q: This is the Question 1
      Q: This is the Question 2
      Q: This is the Question 3
      Q: This is the Question 4

      Note: Each question is a Hyperlink (bookmark) referring into the
      same page (Answers). I still don't know how to create bookmarks
      in XML too


      Q: This is the Question 1
      A: This is the Answer 1

      Q: This is the Question 2
      A: This is the Answer 2

      Q: This is the Question 3
      A: This is the Answer 3

This is the END of my first query. Second one is how to I enable
<HTML> tags between my <XML> tags. How do I tell my XSL that
there can be <HTML> tags like <p>, <table> etc. etc. between
XML?

...Rohit






 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]