Need Help in XSL

I want to generate HTML from a XSD file by using XSL.
Here is a example of how the XSD file could look.
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2000/10/XMLSchema"
targetNamespace="http://www.publishing.org"
xmlns="http://www.publishing.org"
elementFormDefault="qualified">
<xsd:element name="BookCatalogue">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Book" minOccurs="1" maxOccurs="unbounded">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="Title" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="Author" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="Date" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="ISBN" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<xsd:element name="Publisher" type="xsd:string" minOccurs="1" maxOccurs="1"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
in other words the XSD file is variable, i.e. could be any
file. i.e. In stead of the <xsd:element name="Book" > it could well be <xsd:element name="Baseball" >.
So what I need is a XSL script which could dynamically process any XSD file i.e.in the code :
value-of select="BOOK" it could be
value-of select="a variable" an the varivble is the one which comes from the xsd file whichever is supplied.
Any code samples or any form of help is appreciated.
Thanks

Well Actually,
I need to generate the HTML with blank fields, based on the schema first, supplying a template into it.
Then next step is of course to populate it with data from the XML file containing the actual data. That's why ...
Thanks for ur response.
-Ram

Similar Messages

  • Need help in XSL transformation

    Hi, I have a requirement where a message is recieved on the BPEL service. The message is basically a list of 200 or less productids.
    The requirement is to break the incoming message into smaller messages having a list of 50 productids each and then depending on the number of smaller messages call in parrallel a Proxy service in OSB.
    I am not sure how to write an XSL transfor which could split the message into smaller messages.
    I would highly appreciate if somebody could help or give any pointers.

    Hi,
    By passing parameters you can solve your problem.
    write an xsd like below.
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:p="http://schemas.oracle.com/service/bpel/common"
    xmlns="http://schemas.oracle.com/service/bpel/common"
    targetNamespace="http://schemas.oracle.com/service/bpel/common"
    elementFormDefault="qualified">
    <xsd:element name="parameters">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="item" minOccurs="1" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="value" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    create an element say pramsVar of type parameters (Root element in above xsd)
    Now take an assign activity and in copy select XML fragmentand do like below
    In From
    <parameters xmlns="http://schemas.oracle.com/service/bpel/common">
    <item>
    <name>beginIndex</name>
    <value/>
    </item>
    <item>
    <name>endIndex</name>
    <value/>
    </item>
    </parameters>
    assgn the above to paramsVar.
    Now assign proper values to begin and endIndexes (In your case 0 and 50)
    Now pass paramsVar to XSLT and create two paramters in XSLT say beginIndex and endIndex
    You need to use position function in XSLT like below
    *<xsl:if test="(position() > $beginIndex ) and (position() <= $endIndex)">*
    In BPEL you need to increment the beginIndex and EndIndex in a while loop till you reached the last record(In your case 4 times bcoz 200 recs)
    Regards
    PavanKumar.M

  • Need help with XML transformation

    I am not sure this is the right place for this. But i will try it here. I am very troubled with my XSLT. Trying to transform a text Coupon which has the following html for it. So,
    _1. INPUT is:_
    <html>
    <head>
    </head>
    <body>
    <p>
    This coupon is for a good guy whose first name is :
    </p>
    <p>
    </p>
    <p align="center">
    Sadd
    </p>
    <p align="center">
    </p>
    <p align="right">
    <b>also</b> whose <var>full_name</var> is Sadd Hossain
    </p>
    <p align="left">
    </p>
    <p align="left">
    He is a <font size="3">software </font><font size="4">engineer for</font><font size="5">
    S&H</font>
    </p>
    </body>
    </html>
    *2. output needed  is:*
    <?xml version="1.0" encoding="UTF-8"?>
    <POSMESSAGE>
    <TextMSG >
    This coupon is for a good guy whose first name is :
    </TextMSG>
    <TextMSG >
    </TextMSG>
    <TextMSG align="center">
    <emph>SADD</emph>
    </TextMSG>
    <TextMSG >
    </TextMSG>
    <TextMSG align="right" >
    also whose full_name is Sadd Hossain
    </TextMSG>
    <TextMSG>
    </TextMSG>
    <TextMSG align="left" >
    He is a software engineer
    for S&H
    </TextMSG>
    </POSMESSAGE>
    *3. XSLT for this*
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml"/>
    <xsl:template match="body">
    <POSMESSAGE>
    <xsl:for-each select="p">
    <TextMSG>
    <!--xsl:if test="not[@align='']"-->
    <xsl:attribute name="align"><xsl:value-of select="@align"/></xsl:attribute>
    <!--/xsl:if-->
    <xsl:attribute name="font"><xsl:value-of select="@size"/></xsl:attribute>
    <xsl:value-of select="."/>
    </TextMSG>
    <xsl:for-each select="b">
    <emph>
    <xsl:value-of select="."/>
    </emph>
    </xsl:for-each>
    </xsl:for-each>
    </POSMESSAGE>
    </xsl:template>
    </xsl:stylesheet>
    *4: the above xslt generating this output*
    <?xml version="1.0" encoding="UTF-8"?>
    <POSMESSAGE><TextMSG align="" font="">
    This coupon is for a good guy whose first name is :
    </TextMSG><TextMSG align="" font="">
    </TextMSG><TextMSG align="center" font="">
    SADD
    </TextMSG><TextMSG align="center" font="">
    </TextMSG><TextMSG align="right" font="">
    also whose full_name is Sadd Hossain
    </TextMSG><TextMSG align="left" font="">
    </TextMSG><TextMSG align="left" font="">
    He is a software engineer
    for S&H
    </
    *5: Need help with this. what should my xslt look like to get the desired output???????????????*
    any help or direction will be very much appreciated. Thank you_

    I have below suggestions:
    1. Please use code option given in message editor toolbar for posting any formatted content like XML, Java code snippet etc.
    2. replace & in your source XML with _& a m p ;_ (Without spaces, I have put spaces to make it visible here).
    3. I have modified your XSLT according output XML you have given. I am not sure what you want to do with some elements like <b>, <font>, <var> etc. change below XSLT as you require for these elements.
    Modified XSLT:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
            <xsl:output method="xml"/>
         <xsl:template match="body">
              <POSMESSAGE>
                   <xsl:for-each select="p">
                        <TextMSG>
                             <xsl:if test=". != ''">
                                  <xsl:for-each select="@align">
                                       <xsl:attribute name="align">
                                            <xsl:value-of select="."></xsl:value-of>
                                       </xsl:attribute>
                                  </xsl:for-each>
                                  <xsl:value-of select="."/>
                             </xsl:if>
                        </TextMSG>
                   </xsl:for-each>
              </POSMESSAGE>
         </xsl:template>
    </xsl:stylesheet>
    OUTPUT:
    <?xml version="1.0"?>
    <POSMESSAGE>
         <TextMSG>This coupon is for a good guy whose first name is :</TextMSG>
         <TextMSG/>
         <TextMSG align="center">Sadd</TextMSG>
         <TextMSG/>
         <TextMSG align="right">alsowhose full_name is Sadd Hossain</TextMSG>
         <TextMSG/>
         <TextMSG align="left">He is a softwareengineer forS&H</TextMSG>
    </POSMESSAGE>

  • Need help to develop Pythagoras theorem-

    Hi i need help to develop proofs 2,3,4
    of pythagoras theorems in java as demonstrations
    These are applets can anyone help me with it or give me an idea of how to go about developing it -
    the site is the following
    http://www.uni-koeln.de/ew-fak/Mathe/Projekte/VisuPro/pythagoras/pythagoras.html
    then double click on the screen to make it start

    Pardon my ASCII art, but I've always liked the following, simple, geometric proof:
         a                   b
    ---------------------------------------+
    |       |                                |
    a|   I   |              II                |
    |       |                                |
    ---------------------------------------+
    |       |                                |
    |       |                                |
    |       |                                |
    |       |                                |
    |       |                                |
    b|  IV   |              III               |
    |       |                                |
    |       |                                |
    |       |                                |
    |       |                                |
    |       |                                |
    |       |                                |
    ---------------------------------------+It almost goes without saying that I+II+III+IV == (a+b)^2, and II == IV == a*b,
    I == a*a and III == b*b, showing that (a+b)^2 == a^2+a*b+a*b+b^2.
    I hope the following sketch makes sense, stand back, ASCII art alert again:     a                   b
    ---------------------------------------+
    |               .             VI         |
    |     .                 .                |a
    | V                               .      |
    |                                        +
    |                                        |
    |   .                                    |
    b|                                     .  |
    |                                        |
    |                  IX                    |
    | .                                      |
    |                                    .   |b
    |                                        |
    +                                        |
    |      .                                 |
    a|               .                  . VII |
    |  VIII                   .              |
    ---------------------------------------+
                     a                    bThe total area equals (a+b)^2 again and equals the sum of the smaller areas:
    (a+b)^2 == V+VI+VII+VIII+IX. Let area IX be c^2 for whatever c may be.
    V+VII == VI+VIII == a*b, so a^2+b^2+2*ab= c^2+2*a*b; IOW a^2+b^2 == c^2
    Given this fundamental result, the others can easily be derived from this one,
    or did I answer a question you didn't ask?
    kind regards,
    Jos

  • I need help to find and open a job app that I exported, was able to fill out and sign and saved and now can't open it? What did I do wrong?

    I need help to find and open a job app that I exported, was able to fill out and sign and saved and now can't open it? What did I do wrong?

    What file format did you export it to?

  • Need help to open audios attached in a PDF file

    Hello
    I just need help. I have ordered a reviewer online that has audios and texts in a pdf file. I was told to download the latest adobe reader on my computer. I have done the same thing on my ipad mini. I am not so technical with regards to these things. Therefore I need help. I can access the audios on my computer but not on my ipad.
    I want to listen to audios with scripts or texts on them so i can listen to them when i am on the go. I was also informed that these files should work in any device. How come the audios doesnt work on my ipad.
    Please help me on what to do.
    Thanks

    Audio and video are not currently support on Adobe Reader. :-<
    You need to buy a PDF reader that supports them. My suggestion is PDF Expert from Readdle ($US 9.99)

  • Need help to open and look for file by name

    Hi,
            Im needing help to open a folder and look for a file (.txt) on this directory by his name ... The user ll type the partial name of file , and i need look for this file on the folder , and delete it ....
    How can i look for the file by his name ?
    Thx =)

    Hi ,
        Sry ,, let me explain again ... I ll set the name of the files in the follow order ... Name_Serial_date_chanel.sxc ..
    The user ll type the serial that he wants delete ...
    I already figured out what i need guys .. thx for the help ^^
    I used List Directory on advanced IO , to list all .. the Name is the same for all ... then i used Name_ concateneted with Serial(typed)* .. this command serial* ll list all serials equal the typed , in my case , ll exist only one , cuz its a count this serial .Then i pass the path to the delete , and its done !
    Thx ^^

  • I need help, my ipod touch is not recognized by windows as a harddisk

    i need help, my ipod touch is not recognized by windows like a memory card or a harddisk.
    i would like to transfer the files from pc to my ipod touch without useing itunes.
    as i see theres some people here that theires ipod touch are recongnzed as a digitl camra, mine is reconzied as nothing, some help plz.
    Message was edited by: B0Om

    B0Om wrote:
    ok but i still dont understed, only my itnes recongnize my ipod, when i go to " my cumputer, it dosent show up there, not even as a digital camra
    Your Touch is working correctly. Currently, without unsupported third party hacks, the Touch has NO disc mode. It will only show up in iTunes.
    how do i put programes and games in my ipod touch
    Right now, you don't. The SDK is scheduled to be released in Feburary. Then developers will be able to write programs that will be loadable.

  • Weird error message need help..

    SO.. i havent updated my itunes in a while because i keep getting this weird message.. it comes up when im almost done installing the newest/newer versions of itunes. it says
    "the feature you are trying to use is on a network resource that is unavailable" "click ok to try again or enter an alternate path to a folder containing the installation package 'iTunes.msi' in the box below"
    now when ever i choose a file from the browse box it replies with this message "the file 'xxx' is not a valid installation package for the product iTunes. try to find the installation package iTunes.msi in a folder from which you can install iTunes."
    no idea need help thanks
    ~~~lake
    Message was edited by: DarkxFlamexCaster
    Message was edited by: DarkxFlamexCaster

    +it comes up when im almost done installing the newest/newer versions of itunes. it says+ +"the feature you are trying to use is on a network resource that is unavailable" "click ok to try again or enter an alternate path to a folder containing the installation package 'iTunes.msi' in the box below"+
    With that one, let's try the following procedure.
    First, head into your Add/Remove programs and uninstall your QuickTime. If it goes, good. If it doesn't, we'll just attend to it when we attend to iTunes.
    Next, download and install the Windows Installer CleanUp utility:
    Description of the Windows Installer CleanUp Utility
    Now launch Windows Installer CleanUp ("Start > All Programs > Windows Install Clean Up"), find any iTunes and/or QuickTime entries in the list of programs in CleanUp, select those entries, and click “remove”.
    Next, we'll manually remove any leftover iTunes or QuickTime program files:
    (1) Open Local Disk (C:) in Computer or whichever disk programs are installed on.
    (2) Open the Program Files folder.
    (3) Right-click the iTunes folder and select Delete and choose Yes when asked to confirm the deletion.
    (4) Right-click the QuickTime folder and select Delete and choose Yes when asked to confirm the deletion. (Note: This folder may have already been deleted if QuickTime was successfully removed using Add/Remove Programs earlier.)
    (5) Delete the QuickTime and QuicktimeVR files located in the C:\Windows\system32\ folder. Click Continue if Windows needs confirmation or permission to continue. (Note: These files may have already been deleted if QuickTime was successfully removed using Add/Remove Programs earlier.)
    (6) Right-click on the Recycle Bin and on the shortcut menu, click Empty Recycle Bin.
    (7) Restart your computer.
    Now try another iTunes install. Does it go through properly now?

  • I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    I got new hard driver for my MacBook I don't have the cd but I do have flash drive that has the software I need help because when I turn on my laptop it shows me a file with question mark how can I install the software from the flash driver?

    Hold down the Option key while you boot your Mac. Then, it should show you a selection of devices. Click your flash drive and it will boot from that.

  • Need help adobe bridge cc output module

    I need help. I have an assignment I'm held up on completing because the adobe cc bridge does not have the output modue I need. I followed the adobe instructions page to the letter. I copied and pasted the output module folder to the adobe bridge cc extensions folder in programs/commonfiles/adobe. The only thing is the instructions then say to paste the workspace file into the workspace folder located below the bridge extensions folder. I don't have a workspaces folder there or anywhere. I even tried must making one and adding the file to it, but no go. can someone PLEASE help me with this?    I have an assignment due like now that requires the use of the output modue.thanks!

    oh,my system is windows 8.1. sorry, lol.

  • Trying to create a Invoice based on Order need help Error -5002

    the dreaded -5002 error is haunting me too! and I could not find a matching solution for this in the forum....
    I need help quickly on this. I am trying to create invoices for some orders so the Base - Target relationship is retained. The orders I pick are all Open (DocStatus   = O and the lines are all Open LineStatus = O)
    here is my code
    oInvoice.Lines.BaseEntry = 48
    oInvoice.Lines.BaseLine = 0
    oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
    oInvoice.Lines.ItemCode = "A00001"
    oInvoice.Lines.ItemDescription = "IBM Infoprint 1312"
    'adding Line
    oInvoice.Lines.Add
    oInvoice.Lines.BaseEntry = 48
    oInvoice.Lines.BaseLine = 1
    oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
    oInvoice.Lines.ItemCode = "A00002"
    oInvoice.Lines.ItemDescription = "IBM Inforprint 1222"
    'adding Line
    oInvoice.Lines.Add
    lRetCode = oInvoice.Add
    If lRetCode <> 0 Then
        gObjCompany.GetLastError lErrCode, sErrMsg
        MsgBox (lErrCode & " " & sErrMsg)
    End If

    Indika,
    Only set your base types...
    (not items & description)
    oInvoice.Lines.BaseEntry = 48
    oInvoice.Lines.BaseLine = 0
    oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
    oInvoice.Lines.ItemCode = "A00001"
    oInvoice.Lines.ItemDescription = "IBM Infoprint 1312"
    'adding Line (to fill the second item line)
    ' the 1st line item is there by default
    oInvoice.Lines.Add
    oInvoice.Lines.BaseEntry = 48
    oInvoice.Lines.BaseLine = 1
    oInvoice.Lines.BaseType = SAPbobsCOM.BoObjectTypes.oOrders
    oInvoice.Lines.ItemCode = "A00002"
    oInvoice.Lines.ItemDescription = "IBM Inforprint 1222"
    'DO NOT Add THIS line
    ' (only if you want to add a 3rd line item)
    '''oInvoice.Lines.Add -> Don't add this
    lRetCode = oInvoice.Add
    If lRetCode <> 0 Then
        gObjCompany.GetLastError lErrCode, sErrMsg
        MsgBox (lErrCode & " " & sErrMsg)
    End If
    remember to add :
    oInvoice.CardCode = "your BP"
    oInvoice.DocDueDate = Now
    oInvoiceDoc.CardCode = txtDOCBPCode.Text

  • Installation of Photoshop update 13.1.2 for creative cloud fails with error code U44M1P7 I need help

    I need help installing update 13.1.2 for Photoshop creative cloud, installation fails with error code: U44M1P7. Could someone please help?

    Sorry to bother you.
    I could find the answer after searching previous posts about this language problem.
    Had to change my language in AAM profile and then download PS CS6 again ( english version ).
    Then open the actual Photoshop and in preferences > interface you can besides the Dutch also option for English.
    restart application and Voila.
    Greetz, Jeroen

  • Stored DB Procedure - Need help

    Hi. I have a stored database package containing 2 functions. I need help with the function named ret_columns.
    If you look at the code below you will see this function has two different FOR loops. The Select statement in FOR loop that is commented out works just fine, but when I try to use the uncommented select statement in it's place the Function returns NULL (or no records). However, if I run the Select statement in plain old SQL Plus it returns the rows I need. I don't get it.
    Can anyone help me? I'm really stuck on this one.
    -- PACKAGE BODY
    CREATE OR REPLACE package body audit_table_info
    as
    function ret_tables return table_type is
    t_t table_type;
    i integer;
    begin
    i := 1;
    for rec in (select distinct table_name
    from all_triggers
                   where substr(trigger_name,1,9) = upper('tr_audit#')) loop
    t_t(i).tableA := rec.table_name;
    i := i+1;
    end loop;
    return t_t;
    end;
    function ret_columns return column_type is
    c_t column_type;
    i integer;
    begin
    i := 1;
    -- for rec in (select distinct table_name column_name
    -- from all_triggers
    --               where substr(trigger_name,1,9) = upper('tr_audit#')) loop
    for rec in (select distinct b.column_name column_name
    from all_triggers a, all_tab_columns b
                   where a.table_owner = b.owner
                        and a.table_name = b.table_name
                             and substr(a.trigger_name,1,9) = upper('tr_audit#') and rownum < 5) loop                    
    c_t(i).tableB := rec.column_name;
    i := i+1;
    end loop;
    return c_t;
    end;
    end audit_table_info;
    -- PACKAGE DEFINITION
    CREATE OR REPLACE package Audit_Table_Info as
    type table_rec is record( tableA all_tab_columns.TABLE_NAME%type);
    type table_type is table of table_rec index by binary_integer;
    function ret_tables return table_type;
    type column_rec is record( tableB all_tables.TABLE_NAME%type);
    type column_type is table of column_rec index by binary_integer;
    function ret_columns return column_type;
    end Audit_Table_Info;
    /

    It works when I do this!!! I'm so confused.
    Ok...so I did this:
    1 create table test_columns as
    2 (select b.column_name
    3 from all_triggers a,
    4 all_tab_columns b
    5 where a.table_owner = b.owner
    6 and a.table_name = b.table_name
    7 and substr(a.trigger_name,1,9) = upper('tr_audit#')
    8* and rownum < 5)
    SQL> /
    Table created.
    Then altered the Function so the Select statement refers to this table:
    function ret_columns return column_type is
    c_t column_type;
    i integer;
    begin
    i := 1;
    for rec in (select distinct column_name
    from test_columns) loop
    c_t(i).tableB := rec.column_name;
    i := i+1;
    end loop;
    return c_t;
    end;
    Again, any help would be greatly greatly appreciated!

  • Need help with Math related operations...

    I'm learning JAVA for more than 3 weeks and I really need help...
    I'm using SDK1.4 with Elixir IDE Lite (+patch installed).
    In the following screenshot <http://www.geocities.com/jonny_fyy/pics/java1.png>, I've got this error (when I right-click -> Compile) . Do you know what it means & how can I solve it?
    Here's how it should look if correct (pic scan from lab worksheet)... <http://www.geocities.com/jonny_fyy/pics/lab.jpg>
    Here's my java file... <http://www.geocities.com/jonny_fyy/FahToCeltxt.java>
    Thanks for helping :>

    Hi jonny
    One step ahead:
    import java.awt.*;
    import java.applet.*;
    import java.awt.event.*;
    public class FahToCeltxt extends Applet implements ActionListener {
         TextField msgField ;
         String msg = null;
         int msgValue;
         Label title;
         Button b;
         public void init() {
              title = new Label("Enter degrees in Fahrenheit: ");
              add(title);
              msgField = new TextField (10);
              add(msgField);
    //          msgField.addTextListener(this);
              b = new Button("Convert");
              b.addActionListener(this);
              add(b);
    //     public void textValueChanged(TextEvent event) {
    //          msgValue = Integer.parseInt(msgField.getText());
    //          repaint();
         public void paint (Graphics g) {
              int result = (msgValue - 32) * 5/9 ;
              g.drawString("Degree Centigrade is " + result , 50, 50);
      public void actionPerformed(ActionEvent e) {
              msgValue = Integer.parseInt(msgField.getText());
              repaint();
    }Regards.

Maybe you are looking for

  • Mini-DVI cable and connecting via s-video to scart cable

    Hey I bought a mini-dvi adapter a while back and have just purchased a s-video to scart cable to connect it to my television but there is no picture showing just a blue screen. Any help would be gratefully received. Cheers Jon

  • ABAP Proxy Attachments

    Hi All, We have an ABAP proxy that calls the function module BBP_PD_SC_CREATE and creates a ShopppingCart from an external XML file sent via HTTP post. We would now like to expand this by accepting messages and passing these into the ABAP proxy and o

  • Imported graphics look blurry in playback

    This just started creating headaches for me. I have high-resolution graphics (1920x1080 HD resolution) that I have imported into Final Cut Pro X and they look fine in preview mode. However when I go to play it back after render they look blurry. The

  • What is causing this to happen to the screen?

    My son has a new 15" MBP (July 2012). When he tries to play a game on it, like WoW. He is getting this happen on his screen. Is this a video card problem?

  • How to get notified when new java SE update is released

    We need to track security and performance bug fixes and features introduced in each new Java release that comes out.  Is there a linked that we can monitor or feed that updates us when a new java version comes out? Do we need a support contract to re