Examples related to XML and XSLT

Hello friends,
In relation to XML and XSLT
1. As I can transform an XML file using XSLT.
2. I view the XML file using XSLT
3. XSL and XSLT files are equal...?
Thanks for the support

http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXPXSLT6.html

Similar Messages

  • [svn] 3663: Dita xml and xslt support for SkinStates

    Revision: 3663
    Author: [email protected]
    Date: 2008-10-15 13:04:27 -0700 (Wed, 15 Oct 2008)
    Log Message:
    Dita xml and xslt support for SkinStates
    Bugs: SDK-17166
    QA: Yes
    Doc: No
    Tests: checkintests
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17166
    Modified Paths:
    flex/sdk/trunk/asdoc/templates/class-parts.xslt
    flex/sdk/trunk/modules/compiler/src/java/flex2/compiler/asdoc/TopLevelClassesGenerator.ja va

    http://docs.oracle.com/javaee/1.4/tutorial/doc/JAXPXSLT6.html

  • Generate HTML from XML and XSLT

    Hi,
    I have asked in different forum but did not get my answer so asking here again
    i want to generate a HTML file from XML and XSLT in a temp folder and then read it into a java.lang.String, so can email it or write to a database file.
    how can i do it, is there any engine which will merger XML and XSLT and give a HTML file or a String as output
    Ashish

    Hi,
    Follow the simple steps.
    1) Create XML Document (I hope u have it)
    2) Create XSL Stylesheet for your XML document
    3) Put both files in one directory some where in your local system or web server upto u
    4) Invoke the XML document from webbrowser and you are done.
    http://localhost/test/Catalog.xml OR C:\XXXXDIR\test\Catalog.xml
    For Ex: XML File Content, Catalog.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <?xml-stylesheet type="text/xsl" href="Catalog.xsl"?>
    <catalog>
    <cd>
    <title>Empire Burlesque</title>
    <artist>Bob Dylan</artist>
    <country>USA</country>
    <company>Columbia</company>
    <price>10.90</price>
    <year>1985</year>
    </cd>
    </catalog>
    XSL File Content: Catalog.xsl
    <?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="/">
    <html>
    <body>
    <h2>My CD Collection</h2>
    <table border="1">
    <tr bgcolor="#9acd32">
    <th align="left">Title</th>
    <th align="left">Artist</th>
    </tr>
    <xsl:for-each select="catalog/cd">
    <tr>
    <td><xsl:value-of select="title"/></td>
    <td><xsl:value-of select="artist"/></td>
    </tr>
    </xsl:for-each>
    </table>
    </body>
    </html>
    </xsl:template></xsl:stylesheet>

  • Problem with XML and XSLT, help...

    Okay, I have this XML doc (called stocks.xml):
    <?xml:stylesheet type="text/xsl" href="stocks.xsl" version="1.0" encoding="UTF-8"?>
    <portfolio>
    <stock>
    <symbol> SUNW </symbol>
    <name> Sun Microsystem </name>
    <price> 12.95 </price>
    </stock>
    <stock>
    <symbol> HPW </symbol>
    <name> Hewlet Packard </name>
    <price> 53.50 </price>
    </portfolio>
    And I have this XSLT doc (called stocks.xls):
    ?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xls="http://www.w3.org/TR/WD-xsl">
    <xsl:template match="/">
    <html>
    <head>
    <title> Stocks </title>
    <body bgcolor="#ffffcc">
    <xsl:apply-template />
    </body>
    </head>
    </html>
    </xsl template>
    <xsl:template match="portfolio">
    <table border="2">
    <tr>
    <th> Stock Symbol </th><th> Company Name </th><th> Price </th>
    </tr>
    <xsl:for-each select="stock">
    <tr>
    <td>
    <i><xsl:value-of select="symbol" /></i>
    </td>
    <td>
    <xsl:value-of select="price" />
    </td>
    </tr>
    </xsl:for-each>
    </table>
    </xsl template>
    </stylesheet>
    When I try to retrieve the stocks.xml document with
    IE, the browser said, there is an error on line 2, can not
    recognize xsl:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Reference to undeclared namespace prefix: 'xsl'. Error processing resource 'http://localhost:8080/examples/jsp/stocks/stocks.xsl'. Line 2, Position 71
    <xsl:stylesheet version="1.0" xmlns:xls="http://www.w3.org/TR/WD-xsl">
    I just follow this from an example of XML tutorial.
    Please help, what is it that I miss? Seems everything
    I have is okay....??
    Thanks,
    Ted.

    Thanks you all!
    You have spotted that mistyped.
    However, turns out Internet Browser that I have does not permit the use of XSL. After I fixed the file, I got this
    message:
    The XML page cannot be displayed
    Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
    Keyword xsl:apply-template may not be used here.
    Oh well...
    Anybody knows, if IE can or can not be used to view the
    XML that reference XSL??
    Thanks,
    Ted.

  • Jsp xml and xslt architecture

    I am thinking of using xslt to generate html in jsps.
    Can somebody point me to some good examples on how to architecture such a server side system. On best practices and so...
    Thanks
    -S

    here is an example that you can use
    I did put all of it in a bean, this is just for testing xsl
    <%@ page
    import="javax.xml.parsers.*,
    org.w3c.dom.*,
    javax.xml.transform.*,
    javax.xml.transform.stream.*,
    java.io.*"%>
    <%
         StreamSource xml = new StreamSource(new File("c:/xml/file.xml"));
         StreamSource xsl = new StreamSource(new File("c:/xml/file.xsl"));
         StreamResult result = new StreamResult(out);
         TransformerFactory tFactory = TransformerFactory.newInstance();
         Transformer transformer = tFactory.newTransformer(xsl);
         transformer.transform(xml, result);
    %>

  • XML and XSLT Filter Application

    I have a problem with an XSLT filter in EP6 SP2 exact version :
    6.0.2.5.4_ContentManagement_Collaboration
    6.0.2.5.0.Enterprise_Portal_Service_Pack_2
    I have defined an XSL stylesheet as follows in KM Config
    Configuration --> Content Management --> Repository Filters --> XSLT Filter
    name : local_fxrates_xslfilter
    Extensions 
    Formatter 
    MIME Type       text/html
    MIME Types 
    Paths            /webcontent/xml/exchange.xml
    Resource Type 
    Stylesheet       wcm://etc/filter/xsl/exchrates.xsl
    Active       yes
    Priority     1 
    Repositories       feeds
    I have another process that retrieves the appropriate exchange.xml file from a remote source and places it in the
    directory above.  The feeds repository is an fsdb not that it should make any difference.  Now I have a bog standard iview
    thats based on the com.sap.km.cm.docs pointing at the appropriate xml file - the path is the same as above.  This iview
    exists on a page that has a number of other iviews.
    The problem is that periodically I get a server 500 error - a browser refresh ALWAYS makes the problem dissapear and the
    content is then displayed in the correct manner.  This is not an isolated case, any iview I create based on the same
    master and using an XSLT filter to transform some XML content displayes the same behaviour.  To test this I have disabled the XSLT filter and the iview always displays the XML -- all the time everytime leading me to believe that its something to do with the application of the filter ?
    Has anyone else come across this issue before and can point me in the right direction.
    Thanks
    Haydn

    Having been right around the houses now - im confident that both the XSL file and indeed the XML file are correctly constructed and under normal conditions work fine.
    The problem appears to be the CM repository (FSDB mode) being used.  It appears that once an XML file has been changed in the filesystem for whatever reason the first read ALWAYS results in a 500 being thrown.  Subsequent reads are 100% successful until the file is updated again - then the same process begins again. 
    What is even stranger is that if I create a brand new file in the directory (not in portal ui but direct in the FS) I cannot see it in the repository.  BUT if I construct a url to access it in a fresh browser window (which btw works fine) then a refresh of the KM explorer then shows the file - weird huh ?  Of course any actions that occur using the portal UI are also 100% successful.
    If I dont use a CM repository and just use a plain ordinary file system repository - it works faultlessly.
    Haydn

  • Regarding XML and XSLT in Weblogic

    Hi All,
    My servlet should read an XML file in the server and send HTML to the client. I want to convert XML into HTML thru XSL processor. Where should I store my XSL file and XML file. Also are there any things to attach to my classpath.
    Thanx in advance.
    Gopichand.

    I did this using Cocoon along with WebLogic 5.1. You might want to check out
    xml.apache.org to find out about Cocoon. It is not a big deal to integrate it with WebLogic 5.1. I am also posting another message now with the steps i followed to integrate Cocoon into weblogic.
    Thanks
    sai
    Gopichand wrote:
    Hi All,
    My servlet should read an XML file in the server and send HTML to the client. I want to convert XML into HTML thru XSL processor. Where should I store my XSL file and XML file. Also are there any things to attach to my classpath.
    Thanx in advance.
    Gopichand.

  • Importing xml with xslt in InDesign CS4

    Hello All,
    i need someone's help who's an expert at xml and xslt features of InDesign CS4.
    i work in publication, besides our magazines we produce yearbooks with lots of repetative information fields in them. we get the data in xml fromat which we flow in to InDesign. the xml files are very simple, here's an example:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <Root>
    <Story>
          <Country> Afganistan </Country>
    <Company_ID>
       <Company_Name> Kam Air </Company_Name>
       <Company_Code> 1 </Company_Code>
       <Address_text> 1205 Qalla Fatuha </Address_text>
       <Address_text> P.O.Box 456 </Address_text>
       <Address_text> Kabul </Address_text>
       <Address_text> 22004 </Address_text>
       <Address_text> Afganistan </Address_text>
       <Telephone_text> Telephone: +93 20 2200 108 </Telephone_text>
       <Fax_text> Fax: +93 20 2200 110 </Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.flykamair.com </Website_text>
       <Personel_text> Abdul Raquib, chief Executive <Personel_text>
       <Personelmail_text> ([email protected]) </Personelmail_text>
       <Job_code> A1 </Job_code>
    </Company_ID>
         <Country> Albania </Country>
    etc.
    </Story>
    </Root>
    the problem is we don't want <Company_Code> and <Job_code> elements displayed in the InDesign file.
    so we created an xslt file that shoud get rid of these two unwanted elements (obviously the xml file above was pointed to this xslt file)
    <?xml version="1.0" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="/">
    <Root>
    <Story>
      <Country>
    <xsl:for-each select="Company_ID">
       <Company_ID>
          <xsl:value-of select="Company_Name"/>
          <xsl:value-of select="Address"/>
          <xsl:value-of select="Telephone_text"/>
          <xsl:values-of select="Fax_tex"/>
          <xsl:value-of select=Email_text"/>
          <xsl:value-of select="Website_text"/>
          <xsl:value-of select="Personel_text"/>
          <xsl:value-of select="Pesronelmail_text"/>
       </Company_ID>
      </xsl:for-each>
    </Story>
    </Root>
    </xsl:template>
    </xsl:stylesheet>
    but it doesn't work. could someone tell me what's wrong with the xslt file? or what would the correct xslt file look like?
    Thanks everyone!

    Here's the sort of thing I mean in more detail.
    First, the XML file:
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <?xml-stylesheet type="text/xsl" href="transform2.xsl"?>
    <Root>
    <Country>
    <Country_name>Afganistan</Country_name>
    <Company_ID>
       <Company_Name> Kam Air </Company_Name>
       <Company_Code> 1 </Company_Code>
       <Address_text> 1205 Qalla Fatuha </Address_text>
       <Address_text> P.O.Box 456 </Address_text>
       <Address_text> Kabul </Address_text>
       <Address_text> 22004 </Address_text>
       <Address_text> Afganistan </Address_text>
       <Telephone_text> Telephone: +93 20 2200 108 </Telephone_text>
       <Fax_text> Fax: +93 20 2200 110 </Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.flykamair.com </Website_text>
       <Personel_text> Abdul Raquib, chief Executive </Personel_text>
       <Personelmail_text> ([email protected]) </Personelmail_text>
       <Job_code> A1 </Job_code>
    </Company_ID>
    <Company_ID>
       <Company_Name> Another Company </Company_Name>
       <Company_Code> 2 </Company_Code>
       <Address_text> Elswhere</Address_text>
       <Address_text> P.O.Box 123</Address_text>
       <Address_text>Another City</Address_text>
       <Address_text> 22005 </Address_text>
       <Address_text> Afganistan </Address_text>
       <Telephone_text> Telephone: +12345678 </Telephone_text>
       <Fax_text> Fax: +12345678 </Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.dfhdfh.com </Website_text>
       <Personel_text> dfhdfhdfhdfhdfh</Personel_text>
       <Personelmail_text>dfhdfhdfhdfh</Personelmail_text>
       <Job_code> A2 </Job_code>
    </Company_ID>
    </Country>
         <Country>
    <Country_name>Albania</Country_name>
    <Company_ID>
       <Company_Name> Number 3 </Company_Name>
       <Company_Code>3</Company_Code>
       <Address_text>Somewhere in Albania</Address_text>
       <Address_text>Freedonia Avenue</Address_text>
       <Address_text>Whatever the captial of Albania is called</Address_text>
       <Address_text> 88888</Address_text>
       <Address_text> Albania </Address_text>
       <Telephone_text> Telephone: + 666 666 666 666 </Telephone_text>
       <Fax_text> Fax: + 777 777 777 777</Fax_text>
       <Email_text> E-mail: [email protected] </Email_text>
       <Website_text> Website: www.albaniar.com </Website_text>
       <Personel_text>Ludwig Wittgenstein, chief Executive </Personel_text>
       <Personelmail_text> ([email protected]) </Personelmail_text>
       <Job_code> A1 </Job_code>
    </Company_ID>
    </Country>
    </Root>
    Note that I have renamed the XSL file "transform2.xsl". I have got rid of the "Story" tag, and I have nested the tags more appropriately, with a new tag "Country_name". Here's the XSL:
    <?xml version="1.0" ?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:template match="/">
    <Root>
    <xsl:for-each select="/Root/Country">
    <Country>
    <Country_name><xsl:value-of select="Country_name"/></Country_name>
    <xsl:for-each select="Company_ID">
    <Company_Name><xsl:value-of select="Company_Name"/></Company_Name>
    <Address_text><xsl:value-of select="Address_text"/></Address_text>
    <Telephone_text><xsl:value-of select="Telephone_text"/></Telephone_text>
    <Fax_text><xsl:value-of select="Fax_text"/></Fax_text>
    <Email_text><xsl:value-of select="Email_text"/></Email_text>
    <Website_text><xsl:value-of select="Website_text"/></Website_text>
    <Personel_text><xsl:value-of select="Personel_text"/></Personel_text>
    <Personelmail_text><xsl:value-of select="Personelmail_text"/></Personelmail_text>
    </xsl:for-each>
    </Country>
    </xsl:for-each>
    </Root>
    </xsl:template>
    </xsl:stylesheet>
    (That file should be saved as "transform2.xsl" to match the link on line 2 of the XML.)
    Hope that works -- Jeremy

  • Using include-xml and different character encodings

    I have static XML documents which contain different character encodings in the xml prolog....
    ISO-8859, UTF-8, and SHIFT_JIS.
    Each of these documents has entities declared in an internal doctype declaration.
    I have an XSQL page with several <xsql:include-xml href="???.xml"/> statements.
    I want to make either --
    1) UTF-8 as the ultimate encoding of the resulting XML data
    2) Force the encodings on the individual documents to be changed to UTF-8
    I want to get a final XML data steam which can be successfully parsed and transformed. The xsql page has a stylesheet reference.
    Any assistance would be greatly appreciated.
    null

    karol wrote:XML and XSLT are separate, but they're not suitable for printing / pdf generation - LaTeX is. XML is really fluid and has no notions of typesetting built in. It's perfect for on-line reports you view with a web browser.
    Can I ask why XML and XSLT aren't suitable for printing / pdf generation?  Using XSL-FO I can define a page size, margin widths, etc., right?  Just because it isn't normally done doesn't immediately make it a bad idea.  I was under the impression that XML was intended to be abstract enough that it could be used for more than just web pages or data transfer.

  • Import XML, apply XSLT and embed images

    Hi everyone. I've been looking for days now about a way to export the content of a website as XML and import it then into InDesign, involving some basic text formatting and maybe links, lists and tables. Getting a XML version of a website isn't actually the problem. But including some InDesign readable formatting structure caused me some headache.
    First of all, I used InDesign from CS2 and read a lot about INX structure, XML Namespaces and Tagged Text. None of what I did seemed to result in any acceptable or properly working import. So I've read about CS3 having a new feature of applying XSL Stylesheets when importing a XML file and finally downloaded a trial version to test this out. Problem is, I can't find any helpful documentation on how to use this feature right. Neither in the web nor in your forums.
    So how does a XSL file have to look like in order to import XML with some basic formatting?
    Let's say the XML looks like this, very simple:
    ] <?xml version="1.0" encoding="UTF-8"?>
    ] <?xsl-stylesheet type="text/xsl" href="style.xsl"?>
    ] <root>
    ] <text>
    ] <bold>This text is bold</bold> and <italic>this seems to be italic</italic>.
    ] </text>
    ] <underline>I'm under the line</underline>
    ] </root>
    How does my XSLT code in "style.xsl" have to look like in order to tell InDesign that the content of <bold> has to be bold, the one of <italic> italic and leaving <underline> underlined?
    I tried placing Tagged Tags around the content with XSL but this just resulted in errors or plain text output in InDesign. I also tried to understand the magical code structure of INX, but left it behind until I recognized how complex it is.
    Until now, only Tagged Tags do what they shall do for me. Only problem is, the file with this Tagged Tags has to be TXT, but I want XML. Isn't there any way to apply a XSL file over a XML file and replace the XML tags with some Tagged Tags, and finally import everything successful into InDesign? I tried something like that and told the XSL to output the file as Text with
    i <xsl:output method="text" />
    but InDesign replies with an error as "text" is not valid for DOM structuring.
    Moreover, another problem is with importing images without having them saved on the local machine. Meaning, how to send images embed in XML files?
    Here I also tried many things like <![CDATA[base64-code-here]]> and so on, but never happened to tell InDesign that it has to do something with this code instead of just displaying it. Using
    i <image href="data:image/jpeg;base64,base64-code-here" />
    or anything alike didn't work at all.
    In the end, I want to allow downloading a XML version of the viewed site on my website which can be imported into InDesign with all basic formatting used on the site itself. Getting the XML file prepared is just a matter of some PHP scripting. Now I only have to know what InDesign can actually read, and of course, if InDesign is even able to do anything of what I've planned.
    I hope someone can help me.
    Thank you very much in advance, Dan

    XSL will re-arrange incoming XML so that you can flow the XML into an InDesign document that may be arranged differently than the incoming XML file.  You still need to set up tags and associate those tags with styles in order to achieve what you want.  You can use Maivald's "A Designer's Guide to Adobe InDesign and XML: Harness the Power of XML to Automate your Print and Web Workflows" as a starting point, but you will need to play with the pieces to figure it out.<br /><br />For your simple example, you will need to set up tags in text frames for <bold> and <italic>, create paragaph (or object) styles of [bold] and [italic] and then associate those styles with the tags.  Only then can you import the XML file and have things work.  InDesign has no pre-defined knowledge of what any XML tag means, even when the meaning seems obvious.  You are free to define your <bold> XML tag to mean italic text, for example.<br /><br />Though I've read through the Maivald book and converted a Spanish cookbook to English (as a gift for my mom), I am not by any means overly knowledgeable here.  It could well be that there are many ways to achieve the goal and I only know one, lol.<br /><br />Hope this helps.

  • New to XML - what can XML and java do thogether - brief examples please

    I am new to XML and relatively new to Java, thought not new to programming. I am still trying to figure out what can XML do for me in practical terms and when I should use it. Thanks for any examples of when to use XML in conjunction with Java.

    xml : Think of it in terms of business solutions, the way you would think of HTML for drawing fun web-pages.
    java : If you know anything about databases you would know you can embed java with sql E.T.C.
    Therefore because of the fast response times and the amount of constant interaction for business purposes you will need a database type that is strong to handle XML, therefore with such new technology you will be able to use xml databases with java too.
    l am sorry : XML Technology is not more simple than that to explain.
    If you are a christian or jew it is like saying to someone explain the bible,the prophets,the old and new testament in one sentence!!!You get it.What one can do is slightly break-up the bible and say there's an old and new testament.The old testament refers to the time before Jesus, AND the new testament refers to After Jesus, THE PROPHETS RELATE MORE TO THE TIME BEFORE Jesus.
    You can then ask me who is jesus???
    And thats a tricky question in its self becuse it depends on one's thinking(concept)
    I HOPE IT HELPS YOU !!!!
    GOD DAY MATE!!

  • Using XSLT to link XML and ABAP data

    Hi Experts,
    I am using XSLT to deal with XML and ABAP data.
    I using the following statement to convert a Internal Table to XML String:
    CALL TRANSFORMATION id SOURCE  root = lt_sflight RESULT XML l_xml_string.
    And I get the XML String:
    <?xml version="1.0" encoding="utf-16" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <ROOT>
    <SFLIGHT>
    </SFLIGHT>
    <SFLIGHT>
    </SFLIGHT>
    </ROOT>
    </asx:values>
    </asx:abap>
    But What I expected is:
    <?xml version="1.0" encoding="utf-16" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <ROOT>
    <DATA>
    </DATA>
    <DATA>
    </DATA>
    </ROOT>
    </asx:values>
    </asx:abap>
    Could you tell me how to get my dream format using XSLT?
    Best Regards,
    Guo Guo Qing
    Edited by: guoqing guo on Jun 11, 2008 9:58 AM

    Hi Experts,
    I am using XSLT to deal with XML and ABAP data.
    I using the following statement to convert a Internal Table to XML String:
    CALL TRANSFORMATION id SOURCE  root = lt_sflight RESULT XML l_xml_string.
    And I get the XML String:
    <?xml version="1.0" encoding="utf-16" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <ROOT>
    <SFLIGHT>
    </SFLIGHT>
    <SFLIGHT>
    </SFLIGHT>
    </ROOT>
    </asx:values>
    </asx:abap>
    But What I expected is:
    <?xml version="1.0" encoding="utf-16" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
    <asx:values>
    <ROOT>
    <DATA>
    </DATA>
    <DATA>
    </DATA>
    </ROOT>
    </asx:values>
    </asx:abap>
    Could you tell me how to get my dream format using XSLT?
    Best Regards,
    Guo Guo Qing
    Edited by: guoqing guo on Jun 11, 2008 9:58 AM

  • Query on sorting  XML using XSLT and getting the same XML as output !

    Hi,
    Looking for one information regarding sorting XML using XSLT , with the sorted XML as output. For eg. my XML is :
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="sort1.xsl"?>
    <levelone>
         <child ID="1" sort="5">
              <name>Paul</name>
         </child>
         <child ID="2" sort="1">
              <name>Adam</name>
         </child>
         <child ID="3" sort="2">
              <name>Will</name>
         </child>
    </levelone>
    and XSL :
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/levelone">
         <xsl:copy>
         <xsl:apply-templates>
              <xsl:sort select="@sort"/>
         </xsl:apply-templates>
              </xsl:copy>
         </xsl:template>
         <xsl:template match="child">
              <xsl:copy-of select="."/>
         </xsl:template>
    </xsl:stylesheet>
    This does the sort based on Name. But I want to get the same xml as output with the name sorted. Eg.
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="sort1.xsl"?>
    <levelone>
         <child ID="2" sort="1">
              <name>Adam</name>
         </child>
         <child ID="1" sort="5">
              <name>Paul</name>
         </child>
         <child ID="3" sort="2">
              <name>Will</name>
         </child>
    </levelone>
    Any pointers will be highly appreciated.
    - Thanks

    Don't you want <xsl:sort select="name"/> rather than <xsl:sort select="@sort"/>?

  • Using XML extraction from Oracle and XSLT data transformation

    Hi
    How can transfer data ie: Using XML extraction from Oracle and XSLT data transformation with java application?
    usually i use to do querying sql, getting data from table assinging to model class then send it to UI. how can i go for XML extraction form oracle?
    thanks

    Sorry, I don't understand what exactly you want to do. And I'm under the impression that you might not know exactly what you want to do as well. Could you explain a bit more detailed what you want to achieve?

  • Where XML and related file belong when send from FCP to Color?

    Hi(Bonjour)!
    Where XML and related file belong when send from FCP to Color?
    I want to start a fresh project and delete all previous tests.
    Michel Boissonneault

    Hi(Bonjour)!
    I messed up with preference for home directory.
    Thank you.
    Michel Boissonneault

Maybe you are looking for

  • Objects not appearing in build list

    Thanks for reading... I recently downloaded Keynote 3.0 and successfully converted a MS Powerpoint file to Keynote. However, some of the objects are not appearing on my build list. Furthermore, when I try to edit the slide with "new" text, etc they s

  • HT201365 How would i use someone else's iPhone to find my iPhone? what App to I need to run to search for my iPhone

    How would i use someone else's iPhone to find my iPhone? what App to I need to run to search for my iPhone

  • "ERROR disk not found" during boot cdrom installation

    We were booting a T4-4 server from a Solaris 10 boot ISO and command I used was "boot rcdrom - install as nowin" (i was mounting the ISO using the serial redirection window etc, hence the rcdrom) It worked great asking for the" language to be install

  • Component Browser

    I am trying to run an Application Module (Component Browser) but I get this Exception "(oracle.jbo.ConfigException) JBO-33001: Configuration file /tester.xcfg is not found in the classpath." Any idea what the issue is?

  • BEX Query for Week, MTD, YTD  for Sales data

    Hi, I want to display the sales data for current  Calender day, Cal week, Cal Month to date, Cal Year to Date and also for previous year Cal month, Previous Year Calender Year to Date data. Structure is like this. for displaying Sales data. No variab