Urgent XSL Question

For XML
     <PolicyCoverages>
          <row>
               <covNm>Coverage A</covNm>
               <lmt>10000</lmt>
               <deductible>0</deductible>
               <covPremium>2000</covPremium>
               <optFlg>N</optFlg>
          </row>
          <row>
               <covNm>Coverage B</covNm>
               <lmt>20000</lmt>
               <deductible>10</deductible>
               <covPremium>3000</covPremium>
               <optFlg>N</optFlg>
          </row>
     </PolicyCoverages>
XSL For the above XML
<xsl:for-each select="PolicyCoverages/row">
     <tr>
          <td><xsl:value-of select="covNm"/></td>
          <td><xsl:value-of select="lmt"/></td>
          <td><xsl:value-of select="deductible"/></td>
          <td><xsl:value-of select="covPremium"/></td>
          <td><xsl:value-of select="optFlg"/></td>
     </tr>
</xsl:for-each>
A small change in the above XML
     <table name="Policy Coverages">
          <row>
               <parm name="covNm">Coverage A</parm>
               <parm name="lmt">10000</parm>
               <parm name="deductible">0</parm>
               <parm name="covPremium">2000</parm>
               <parm name="optFlg">N</parm>
          </row>
          <row>
               <parm name="covNm">Coverage B</parm>
               <parm name="lmt">0</parm>
               <parm name="deductible">0</parm>
               <parm name="covPremium">0</parm>
               <parm name="optFlg">N</parm>
          </row>
     </table>
What is the equivalent XSL for this XML ?

here you go:<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format">
     <xsl:output method="html" encoding="utf-8"/>
     <xsl:template match="table">
          <table>
               <xsl:apply-templates select="row"/>
          </table>
     </xsl:template>
     <xsl:template match="row">
          <tr>
               <xsl:apply-templates select="parm"/>
          </tr>
     </xsl:template>
     <xsl:template match="parm">
          <td>
               <xsl:value-of select="text()"/>
          </td>
     </xsl:template>
</xsl:stylesheet>

Similar Messages

  • Urgent SQL question : how to flip vertical row values to horizontal ?

    Hello, Oracle people !
    I have an urgent SQL question : (simple for you)
    using SELECT statement, how to convert vertical row values to horizontal ?
    For example :
    (Given result-set)
    MANAGER COLUMN1 COLUMN2 COLUMN3
    K. Smith ......1
    K. Smith ...............1
    K. Smith ........................1
    (Needed result-set)
    MANAGER COLUMN1 COLUMN2 COLUMN3
    K. Smith ......1 .......1 .......1
    I know you can, just don't remeber how and can't find exactly answer I'm looking for. Probably using some analytic SQL function (CAST OVER, PARTITION BY, etc.)
    Please Help !!!
    Thanx !
    Steve.

    scott@ORA92> column vice_president format a30
    scott@ORA92> SELECT f.VICE_PRESIDENT, A.DAYS_5, B.DAYS_10, C.DAYS_20, D.DAYS_30, E.DAYS_40
      2  FROM   (select t2.*,
      3                row_number () over
      4                  (partition by vice_president
      5                   order by days_5, days_10, days_20, days_30, days_40) rn
      6            from   t2) f,
      7           (SELECT T2.*,
      8                row_number () over (partition by vice_president order by days_5) RN
      9            FROM   T2 WHERE DAYS_5 IS NOT NULL) A,
    10           (SELECT T2.*,
    11                row_number () over (partition by vice_president order by days_10) RN
    12            FROM   T2 WHERE DAYS_10 IS NOT NULL) B,
    13           (SELECT T2.*,
    14                row_number () over (partition by vice_president order by days_20) RN
    15            FROM   T2 WHERE DAYS_20 IS NOT NULL) C,
    16           (SELECT T2.*,
    17                row_number () over (partition by vice_president order by days_30) RN
    18            FROM   T2 WHERE DAYS_30 IS NOT NULL) D,
    19           (SELECT T2.*,
    20                row_number () over (partition by vice_president order by days_40) RN
    21            FROM   T2 WHERE DAYS_40 IS NOT NULL) E
    22  WHERE  f.VICE_PRESIDENT = A.VICE_PRESIDENT (+)
    23  AND    f.VICE_PRESIDENT = B.VICE_PRESIDENT (+)
    24  AND    f.VICE_PRESIDENT = C.VICE_PRESIDENT (+)
    25  AND    f.VICE_PRESIDENT = D.VICE_PRESIDENT (+)
    26  AND    f.VICE_PRESIDENT = E.VICE_PRESIDENT (+)
    27  AND    f.RN = A.RN (+)
    28  AND    f.RN = B.RN (+)
    29  AND    f.RN = C.RN (+)
    30  AND    f.RN = D.RN (+)
    31  AND    f.RN = E.RN (+)
    32  and    (a.days_5 is not null
    33            or b.days_10 is not null
    34            or c.days_20 is not null
    35            or d.days_30 is not null
    36            or e.days_40 is not null)
    37  /
    VICE_PRESIDENT                     DAYS_5    DAYS_10    DAYS_20    DAYS_30    DAYS_40
    Fedele Mark                                                          35473      35209
    Fedele Mark                                                          35479      35258
    Schultz Christine                              35700
    South John                                                                      35253
    Stack Kevin                                    35701      35604      35402      35115
    Stack Kevin                                    35705      35635      35415      35156
    Stack Kevin                                    35706      35642      35472      35295
    Stack Kevin                                    35707      35666      35477
    Stack Kevin                                               35667      35480
    Stack Kevin                                               35686
    Unknown                             35817      35698      35596      35363      35006
    Unknown                                        35702      35597      35365      35149
    Unknown                                        35724      35599      35370      35155
    Unknown                                                   35600      35413      35344
    Unknown                                                   35601      35451      35345
    Unknown                                                   35602      35467
    Unknown                                                   35603      35468
    Unknown                                                   35607      35475
    Unknown                                                   35643      35508
    Unknown                                                   35644
    Unknown                                                   35669
    Unknown                                                   35684
    Walmsley Brian                                 35725      35598
    23 rows selected.

  • Urgent 508 Question!

    The only thing i need to do is add a title or label attribute to some of the controls.
    One of the ones to begin with that i am fixing is the ADF tag af:selectBooleanRadio. When i add some text to the shortDesc field of the control, the html is produces doesn't have the title attribute.
    So i tried to use the corresponding trinidad control tr:selectBooleanRadio, and add some text to the same shortDesc field for the control, and in this case it does add a title attribute in the html that it produces.
    Everything else in the code works fine as well when i add the trinidad control, except for one thing. I have a ValueChangeListener that gets called when you click on another tr:selectBooleanRadio. Within that valueChangeListener event handler function, i have a bunch of code which in the end displays a af:popup. The problem i am having when using the trinidad control is that it somehow is not allowing the display of the popup even though it is going through the code that executes display of the popup. When i click on another link or button that is supposed to display a different popup as well, then the popup associated with the tr:selectBooleanRadio also displays at that time, but not originally when the value changed by selecting a different tr:selectBooleanRadio.
    So, my question is, are there any other successful ways of adding a title attribute to the these controls. If its the af:selectBooleanRadio how do we make it so that the html it generates has the title attribute, or if its the tr:selectBooleanRadio, what might be happening during the event handling that it is not allowing the af:popup to display?
    A quick response to this appreciated since this is very urgent! Thanks very much for your help!

    JDev version is 11.1.1.5
    ok, i will go one step at a time so that it is easy to understand. So i will only mention the first thing right now and then we can try other things later.
    i have a af:selectBooleanRadio. After running the page/application, when the user does View Source in the browser for the page that has the radio button, it is in the form of an HTML tag <input> of type for radio button. What i want to do is to have a "title" attribute for the <input> tag for this radio button. I can use the tr:selectRadioButton trinidad control to do that, but then i have other issues with that, and we can talk about those later.
    Let me know if it is still not clear.
    Thanks very much for your help!

  • URGENT : Challenge questions query: Oracle Access Manager 10g

    Hi all,
    This is a query regarding password challenge questions in Oracle Access Manager 10g. We have created password policies for a specific container in OID (say cn=xxx,cn=users,dc=oracle,dc=com) and it is working fine.
    In order to exclude certain set of users (say user ABC ) for password policies, we have set the obpasswordchangeflag to false for those users which are in same container for which password policy is created.
    When we try to login to the application with the user say ABC, I am not seeing any reset password page - I am happy till this point. However it is showing Configure Challenge questions page. Is there any way to bypass this page? Or is this the expected behavior?
    This is very urgent and prompt reply is very much appreciated.
    -Mahendra

    Hi Mahendra,
    This is expected behaviour. In order to exclude the password policy management for some certains user for particular domain/container. please add the below configuration parameter to your OAM10g password policy.
    Password Policy Filter Field     (!(|(cn=xxx)(cn=abc)))
    ----Ajay

  • Urgent constructor question..

    I'm trying to call this Flower class in another class called Garden, in which I created a new Flower by using a statement
    private Flower lastflower;
    and it's saying it cannot find the symbol - constructor Flower.
    Can anyone tell me why and help correct this problem?
    Below is the code for my Flower class.
    Any help is really appreciated, it's for my Java class!
    import objectdraw.*;
    import java.awt.*;
    * Write a description of class Flower here.
    * @author (your name)
    * @version (a version number or a date)
    public class Flower
        protected FilledOval dot;
        protected FilledRect stem;
        protected FilledOval petal1;
        protected FilledOval petal2;
        protected static final int boundary = 100;
        protected RandomIntGenerator colorGen =
                new RandomIntGenerator(0,255);
        protected Color petalColor;
        protected Boolean flowerContains=false;
        private DrawingCanvas canvas;
        public void changeColor(){
        dot = new FilledOval(150,150,15,15, canvas);
        dot.setColor(Color.YELLOW);
        petalColor = new Color(colorGen.nextValue(),
                                    colorGen.nextValue(),
                                    colorGen.nextValue());
        petal1.setColor(petalColor);
        petal2.setColor(petalColor);
        public void grow(Location point){
        stem = new FilledRect (dot.getX()+3, dot.getY()+10, 10, 10, canvas);
        stem.setColor(Color.GREEN);
        if (dot.getY()>boundary){
            dot.move(0,-4);
        else{
         petal1 = new FilledOval(dot.getX()-12, dot.getY()-25, 40,70,canvas);
         petal2 = new FilledOval(dot.getX()-25, dot.getY()-10, 70,40,canvas);
         dot.sendToFront();
         stem.sendToBack();
         petal1.setColor(petalColor);
         petal2.setColor(petalColor);
        public Boolean flowerContains(Location point){
            if (petal1.contains(point)){
                return true;
            else if (petal2.contains(point)){
                return true;
            else if (dot.contains(point)){
                return true;
            else{
                return false;
    }

    I don't care how fucking urgent you think it is, it isn't to us. We will answer your question when and how we feel llike it. Have some manners and if you must, then bump your original post. Don't create another time wasting piece of cr&#97;p!

  • Help please - urgent exam question

    I'm having difficulty with the following question for an OU exam:
    You will now create a method to enable students to make a list of the books they have read, whether they are on the course�s reading list or not.
    Add an instance method to the class, with the header: public Set<String> collectBooksRead()
    The method should first declare a local variable of type Set called readBooks capable of holding a set of strings.
    The method should then assign to that variable an appropriate set object.
    The method should then use a dialogue box to collect the book titles one at a time from the user.
    The dialogue box should have the prompt "Please input a book title or * to finish", and should have an empty string as its default reply.
    Each entered book title should be added to the set referenced by the local variable readBooks. Finally the method should return readBooks as the message answer.
    Here's my code so far but it endlessly loops and I'm unsure how to make it stop.
    public Set<String> collectBooksRead()
    Set<String> readBooks = new HashSet<String>();
    String title;
    do
    title = OUDialog.request("Please input a book title or * to finish",""); //OUDialog.request displays an input dialogue box as specified by a superclass
    readBooks.add(title);
    while
    (title != "*");
    }  

    I'm having difficulty with the following question for
    an OU exam:
    You will now create a method to enable students to
    make a list of the books they have read, whether they
    are on the course�s reading list or not.
    Add an instance method to the class, with the header:
    public Set<String> collectBooksRead()
    The method should first declare a local variable of
    type Set called readBooks capable of holding a set of
    strings.
    The method should then assign to that variable an
    appropriate set object.
    The method should then use a dialogue box to collect
    the book titles one at a time from the user.
    The dialogue box should have the prompt "Please input
    a book title or * to finish", and should have an
    empty string as its default reply.
    Each entered book title should be added to the set
    referenced by the local variable readBooks. Finally
    the method should return readBooks as the message
    answer.
    Here's my code so far but it endlessly loops and I'm
    unsure how to make it stop.
    unplug the computer. works every time

  • Xsl question

    Dear xsl gurus!
    My very limited knowledge of xsl doesn't allow me to come up with better solution.Can you please suggest something looking better.
    My xml document has very simple structure with 3 subnodes of the same level:
    <DOC>
    <a>...</a>
    <b>...</b>
    </DOC>
    The info from under <a> and <b> nodes should go under one node (into one table column). The best I could think of is to make it go under two diff columns COLUMN_A and COLUMN_B of some staging table and then concatenate those columns. For this I came up with this xsl:
    <xsl:for-each select="DOC">
    <ROW>
    <xsl:for-each select="./a">
    <COLUMN_A>
    <xsl:value-of select="."/>
    </COLUMN_A>
    </xsl:for-each>
    <xsl:for-each select="./b">
    <COLUMN_B>
    <xsl:value-of select="."/>
    </COLUMN_B>
    </xsl:for-each>
    </ROW>
    </xsl:for-each>
    How can I make <a> and <b> go under the same node so that I wouldn't need a staging table?
    Thank you.
    Anatoliy Smirnov

    Give it a try :
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
         <xsl:template match="/">
              <xsl:apply-templates/>
         </xsl:template>
         <xsl:template match="DOC">
              <row>
                   <xsl:value-of select="./a"/>
                   <xsl:value-of select="./b"/>
              </row>
         </xsl:template>
    </xsl:stylesheet>

  • Xsl question: how to start a new table if recordnumber exceeds 22

    Hi.
    I was hoping someone could help me with this problem...
    I got a simple table where I receive 4 variables from the xsql
    query:PNS (nom. size), POD (dia.(mm)), PWTH (Wall th.(mm)) and
    PSCH (Schedule). The result is presented on a web-page, but
    because we also want to print it out, we are not able to present
    more than 22 records in each table. How do I tell the XSL to
    start printing a new table when it has reached 22 records?
    Example of XML:
    <ROWSET>
    <ROW>
    <PNS></PNS>
    <POD></POD>
    <PWTH></PWTH>
    <PSCH><PSCH>
    </ROW>
    <ROW>
    <PNS></PNS>
    <POD></POD>
    <PWTH></PWTH>
    <PSCH><PSCH>
    </ROW>
    </ROWSET>
    Example of XSL:
    <table class="no" style="width:170mm;padding:1pt;"
    cellspacing="0" border="1">
    <tr>
    <td class="b">Nom. Size(in)</td>
    <xsl:for-each select="WALLTHICKNESS/WALLTHICKNESS_ROW">
    <td class="lb"><xsl:value-of select="PNS"/></td>
    </xsl:for-each>
    </tr>
    <tr>
    <td class="t">dia.(mm)</td>
    <xsl:for-each select="WALLTHICKNESS/WALLTHICKNESS_ROW">
    <td class="lt"><xsl:value-of select="POD"/></td>
    </xsl:for-each>
    </tr>
    <tr>
    <td class="t">Wall th.(mm)</td>
    <xsl:for-each select="WALLTHICKNESS/WALLTHICKNESS_ROW">
    <td class="lt"><xsl:value-of select="PWTH"/></td>
    </xsl:for-each>
    </tr>
    <tr>
    <td class="t">Schedule</td>
    <xsl:for-each select="WALLTHICKNESS/WALLTHICKNESS_ROW">
    <td class="lt"><xsl:value-of select="PSCH"/> </td>
    </xsl:for-each>
    </tr>
    </table>
    Regards,
    Terje K.

    DOMParser parser=new DOMParser();
    XMLDocument xmlDocument=parser.getdocument();
    Node node=xmlDocument.selectSingleNode("/ROWSET/ROW");
    Element element=xmlDocument.createElement(String tagName)
    node.appendChild(element);

  • Very urgent BPS questions

    hey pals,
    I have couple of doubts which are very urgent to be clarified.
    1.how to debug the code in fox editor?
    2.can we use transactional infocubes in bps?
    3.can we use multiprovider for planning?
    4.how to fine tune the standard planning functions provided by sap?
    5.when exit variables are used?
    I need these answers asap.Anyone with suitable answer will be rewarded immediately.Thank you.
    Regards,
    Rags

    1.how to debug the code in fox editor?
         use break-point in FOX code
    2.can we use transactional infocubes in bps?
         yes. Transactional cubes are meant for only BPS.
    3.can we use multiprovider for planning?
       Yes. multiproviders can be used both in basic planning area as well as multi planning area.
    4.how to fine tune the standard planning functions provided by sap?
       these are not recommended. But, create exit & FOX functions to meet your requirements.
    5.when exit variables are used?
       If variable1 needs to be derived from variable2. (in which, end user fills only variable2).

  • Urgent SSL questions

     

    Why in the name of God don't you post this sample code here in the newsgroup so everyone can see it instead of just emailing it to a single individual? Can you please post it?
    Bryan O'Sullivan <[email protected]> wrote:
    b> All docs on the BEA website talk about 2-way authentication with
    b> browsers and servlets. Can I use the T3Client (t3s://host:port) in
    b> setting up my InitialContext to talk to beans on the server to
    b> create the secure connection?
    Yes, you can. You need to set up some extra environment parameters to
    do this, which unfortunately aren't well-documented in 4.5. I'll send
    you a code example that should clarify things.
    b> Do I need a specific service pack to enable this functionality?
    You need at least 4.5.1sp5. This functionality was documented as
    working in earlier 4.5 releases, but embarrassingly enough for us, it
    didn't.
    b> "Important: Certificates from Microsoft Internet Information Server
    b> and Netscape Enterprise Server cannot be used with Weblogic Server,
    b> because they are stored in a proprietary format."
    b> Does this pertain to Netscape Certificate Server as well?
    I don't know; I've never used NCS. However, if NCS can spit out
    certificates in X.509 format, using either DER or PEM encoding, then
    you should have no problems.
    b> Where can I find code samples for doing what I want to do?
    If you're using a Java client, we actually don't ship any useful
    examples of two-way SSL authentication with WLS 4.5.x. However, I'll
    mail you a copy of an example program from Denali beta 2 which should
    work with a 4.5.x server.
    b> The "Using Weblogic SSL" page is not too useful for implementation
    b> details.
    I know. We've worked to beef the documentation up for Denali. As you
    can imagine, since we documented two-way SSL authentication as working
    in 4.5 but never really got any complaints from customers about the
    fact that it was broken (I just happened to notice it myself), it's
    not a feature that has seen much use yet. I apologise for the
    roughness around the edges so far; I hope this information helps you
    to find out what you need.
    When Denali beta 2 comes out, you might want to download it and look
    at its expanded support for two-way SSL authentication. It's really
    quite a bit more useful than 4.5 in this regard.
    If you have any further questions, please feel free to ask.
         <b
    Let us pray:
    What a Great System.
    Please Do Not Crash.
    ^G^IP@P6

  • URGENT: Unicode questions

    Hi experts out there
    We need to have a unicode system soon.
    At the moment we have a non unicode R/3 Rel. 4.7 Enterprise.
    My questions are:
    1. Are there patches that upgrade the non unicode R/3 Rel. 4.7 Enterprise to the unicode R/3 Rel. 4.7 Enterprise?
    2. Should we better upgrade it to ECC 6.0? What is the effort here?
    Any suggestions/responses would be very appreciated.
    Thanks
    HW

    There cant be patches because the data must be converted from a certain code page to unicode.

  • Attaching/Linking XSL Question

    Hi,
    How can I attach/link an XSL file in an XML document that I'm currently creating/forming (using TransformerHandler)?
    Here's the code:
    try
           mTransformerHandler = mSAXTransformerFactory.
                   newTransformerHandler(new StreamSource(new File(
                   "D:\\tempTransform.xsl")));                     
           mTransformerHandler.setResult(new StreamResult(
                   new File("c:\\tmp.xml")));
           Transformer trans = mTransformerHandler.getTransformer();
           trans.setOutputProperty(OutputKeys.ENCODING, "SHIFT_JIS");
           mTransformerHandler.startDocument();               
           mTransformerHandler.startElement("tag1","tag1", "tag1", new
                   AttributesImpl());
           String str = "sample char";
           mTransformerHandler.characters(str.toCharArray(),       
                   0, str.toCharArray().length);
           mTransformerHandler.endElement
                   ("tag1","tag1", "tag1");                              
           mTransformerHandler.endDocument();
    catch(Exception e)
           System.out.println("e >> " + e);
    . . . .The XSL file transforms the xml into an html code.
    What I need is just to attach/link the XSL to the created XML and not to transform to the output of the XSL.
    Any suggestions?
    Thanks a lot.

    If I understand you correctly, you want it to output your XML as it is, but with a <?xml-stylesheet type="text/xsl" href="blah.xsl"?>?
    If that's what you want, you don't need an actual transformation at all. You only have to insert a processing instruction into your document and use a handler that simply writes your XML to the output.
           // get a transformer that directly copies the XML to the output; no transformation needed
           mTransformerHandler = mSAXTransformerFactory.
                   newTransformerHandler();                     
           mTransformerHandler.setResult(new StreamResult(
                   new File("c:\\tmp.xml")));
           Transformer trans = mTransformerHandler.getTransformer();
           trans.setOutputProperty(OutputKeys.ENCODING, "SHIFT_JIS");
           mTransformerHandler.startDocument();
           // insert a processing instruction into the document
           mTransformerHandler.processingInstruction("xml-stylesheet", "type=\"text/xsl\" href=\"blah.xsl\"");
           mTransformerHandler.startElement("tag1","tag1", "tag1", new
                   AttributesImpl());
           String str = "sample char";
           mTransformerHandler.characters(str.toCharArray(),       
                   0, str.toCharArray().length);
           mTransformerHandler.endElement
                   ("tag1","tag1", "tag1");                              
           mTransformerHandler.endDocument();

  • Simple XSL question.

    Hi there, I am trying to do a form with a List Menu that will
    populate the Labels and Values from an xsl fragment page, so far I
    was able to set the labels from the XML file but I am having
    problems when placing code on the VALUE section of the list menu.
    Here is my code
    <select name="Se" id="Se">
    <xsl:for-each select="gallery/album">
    <option
    value=xsl:value-of select='@id'><xsl:value-of
    select="@title"/></option>
    </xsl:for-each>
    </select>
    Thanks for your time and help....

    I ment that there would not be any closing tag. <TAG>...</TAG>
    but I found that
    <xsl:element name="NUMBER"><xsl:attribute name="V"><xsl:value-of select="text()"/></xsl:attribute></xsl:element>
    works!
    Thanks anyway !

  • Xsl question - call xsl from another xsl

    Hi,
    I have a xsl which should be invoked from another xsl. I have a transformheader.xsl which transforms the header values. I would like to invoke this xsl from various client xsl files.(to transform the header).
    transformheader.xsl should take the header as input and give header as output.
    Basically I am moving the header transform logic to one xsl file & reuse it.
    Can you please help me with the syntax or any links to samples/docs?
    transformheader.xsl:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsl:stylesheet version="1.0">
    <xsl:template match="/">
    <ns1:header>
    <ns1:ebmAID>
    <xsl:value-of select="/ns1:header/ns1:ebmBID"/>
    </ns1:ebmAID>
    <ns1:ebmBID>
    <xsl:value-of select="/ns1:header/ns1:ebmAID"/>
    </ns1:ebmBID>
    </ns1:header>
    </xsl:template>
    </xsl:stylesheet>
    client1.xsl(transforms one message to other, both has the header)
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper......>
    <xsl:stylesheet version="1.0">
    <xsl:template match="/">
    <tns:sampleee>
    <hdr:header>
    ===== invoke the transformheader.xsl to insert the header here
    </hdr:header>
    <tns:body>
    <xsl:for-each select="xxxxx">
    </tns:body>
    </tns:sampleee>
    </xsl:template>
    </xsl:stylesheet>

    Here you go:
    CreateHeader.xsl
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         xmlns:inp="http://temp.org/input"
            xmlns:out="http://temp.org/output"       
                    >
         <xsl:template name="CreateHeader">
                 <xsl:param name="InputHeader"/>
                   <out:header>
                        <out:ebmAID>
                             <xsl:value-of select="/inp:header/inp:ebmID"/>
                        </out:ebmAID>
                        <out:ebmBID>
                             <xsl:value-of select="/inp:header/inp:ebmContextID"/>
                        </out:ebmBID>
                   </out:header>
         </xsl:template>
    </xsl:stylesheet>Main XSL:
    <xsl:stylesheet version="1.0"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         xmlns:inp="http://temp.org/input"
            xmlns:out="http://temp.org/output"       
                    >
         <!-- Import the createHeader.xsl here -->
         <xsl:import href="CreateHeader.xsl"/>
         <xsl:template match="/">
              <out:RootElement>
                   <!-- This will inser the header by calling the CreateHeader XSL -->
                   <xsl:call-template name="CreateHeader">
                        <xsl:with-param name="InputHeader" select="inp:header"/>
                   </xsl:call-template>
                   <xsl:for-each select="/inp:body">
                        <out:body>
                             <!-- logic for creating body goes here -->
                        </out:body>
                   </xsl:for-each>
              </out:RootElement>
         </xsl:template>
    </xsl:stylesheet>

  • XSL question related to XPATH comparsion

    I�m new to XSL and I�m trying to display something in a Hierarchy. I have a XML file
           <OUTPUT>
              <STATEMENT>
                   <CurrentActivity>
                        <TransDesc>First current </TransDesc>
                        <TransDetailCount>1</TransDetailCount>
                   </CurrentActivity>
                   <CurrentActivity>
                        <TransDesc>second current </TransDesc>
                        <TransDetailCount>2</TransDetailCount>
                   </CurrentActivity>
                   <CurrentActivity>
                        <TransDesc>Third current </TransDesc>
                        <TransDetailCount>3</TransDetailCount>
                   </CurrentActivity>
                   <CurrentActivity2>
                        <TransDesc>First current2 </TransDesc>
                        <TransDetailCount>1</TransDetailCount>
                   </CurrentActivity2>
                   <CurrentActivity2>
                        <TransDesc>second current2 </TransDesc>
                        <TransDetailCount>1</TransDetailCount>
                   </CurrentActivity2>
                   <CurrentActivity2>
                        <TransDesc>Third current2 </TransDesc>
                        <TransDetailCount>2</TransDetailCount>
                   </CurrentActivity2>
              </STATEMENT>
         </OUTPUT>I want to to display as
    First current
    1
    First current2
    1
    Second current2
    1
    Second current
    2
    Third current2
    2
    Third current
    3
    So you process the first current activity element and then check the CurrentActivity2 element that have TransDetailCount that match CurrentActivity.
    The XSL I have now that does not work is :
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><xsl:template match="/">
    <xsl:variable name="outputData" select="/OUTPUT"/>
    <xsl:variable name="statementData" select="$outputData/STATEMENT"/>
          <xsl:for-each select="$statementData/CurrentActivity">
          <tr>
            <td><xsl:value-of select="TransDesc"/></td><br/>
             <td><xsl:value-of select="TransDetailCount"/></td><br/>
          </tr>
                     <xsl:for-each select="$statementData/CurrentActivity2">
                          <xsl:if test="TransDetailCount=$statementData/CurrentActivity/TransDetailCount'">
                               <td><xsl:value-of select="TransDesc"/></td><br/>
                               <td><xsl:value-of select="TransDetailCount"/></td><br/>
                          </xsl:if>
                   </xsl:for-each>
          </xsl:for-each>
    </xsl:template></xsl:stylesheet> Any assistance would be greatly appriecated!!
    Thanks,
    Bill

    The XSLT for required output is:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <xsl:apply-templates select="OUTPUT/STATEMENT/CurrentActivity[TransDesc='First current ']"/>
    <xsl:apply-templates select="OUTPUT/STATEMENT/CurrentActivity2[TransDesc='First current2 ']"/>
    <xsl:apply-templates select="OUTPUT/STATEMENT/CurrentActivity[TransDesc='second current ']"/>
    <xsl:apply-templates select="OUTPUT/STATEMENT/CurrentActivity2[TransDesc='second current2 ']"/>
    <xsl:apply-templates select="OUTPUT/STATEMENT/CurrentActivity[TransDesc='Third current ']"/>
    <xsl:apply-templates select="OUTPUT/STATEMENT/CurrentActivity2[TransDesc='Third current2 ']"/>
    </xsl:template>
    <xsl:template match="CurrentActivity">
    <xsl:apply-templates select="TransDesc"/>
    <xsl:text>
    </xsl:text>
    <xsl:apply-templates select="TransDetailCount"/>
    <xsl:text>
    </xsl:text>
    </xsl:template>
    <xsl:template match="CurrentActivity2">
    <xsl:apply-templates select="TransDesc"/>
    <xsl:text>
    </xsl:text>
    <xsl:apply-templates select="TransDetailCount"/>
    <xsl:text>
    </xsl:text>
    </xsl:template>
    </xsl:stylesheet>

Maybe you are looking for

  • How to show NULL value when import data into excel

    when retrieve data from sql server and import these data into excel. data source  is like : select a ,b c from tab if a,b,c is nullable. when import these NULL value into excel, it becomes blank value, there is nothing in the excel cell. if i don't w

  • How to split data from month to week 4/4/5?

    Hello, Is there any R/3 function based on 4/4/5 calendar that determines the number of weeks of the month? At the end, I'd like to split monthly data into weekly basis. Thanks

  • Emails won't load

    For about a week now, my emails haven't been loading. The email headers/subject will show but no content in the body. We've changed nothing but noticed this, amongst other things, after the most recent Android install.

  • Stop conversion of E-value

    Hey guys,      This wasn't a problem before, but since I have updated to Flex 4.5.  All my e-values are 0 when displayed but when passed from ColdFusion to Flex app they are in scientific notation.  I have even tried to wrap the values in single quot

  • Audiobook and Games not showing up

    My wife's G4 cube has the latest version of OSX and ITunes but the audiobook and Ipod games categories do not show up under the library like they do on my ibook. Why is that?