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

Similar Messages

  • 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

  • [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);
    %>

  • 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.

  • 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?

  • Finding and retrieving an XML file from an application and an applet

    I have a problem.
    I have data stored in an XML file. I want to be able to call that file and store it into a document object from an application standing alone on a computer as weel as from an applet that would be running over the web.
    I don't know how to do this.
    When I use a relative path name for the application it attaches the path of the folder that contains java.exe. I could do something with the class path but this wouldn't help the end user of the application on a different computer. For similar reasons I don't want to hard code because I don't know where the final applet will be stored.
    I have a table that holds, sorts and filters the data so I want the table to collect the data, I don't want to dictate the path from the applet or the application, I want a method that is consistant with both scenarios.
    Can anyone offer some advice?

    I've just finished trying it out, here is what I did:
    String xmlDocName="filename.xml";
    java.net.URL fileURL=this.getClass().getResource(xmlDocName);
    private final String fileName = fileURL.toString().substring(6);
    The substring removes the "file:/" from the URL.
    This works fine in the IDE, I have even stored the xml file in a lower folder e.g. package_folder/xml_folder/filename.xml and replaced the xmlDocName with "xml_folder/filename.xml" and it worked fine.
    I haven't tried it in an applet because I'm running IE and as you are well aware there are problems with swing and IE applets. But you answer deserves the Duke Dollars, thank you very much.

  • 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

  • Using ADL when Application.xml and Content.swf are not in the BIN directory

    Hello, I am trying to use the air debug launcher (ADL) to
    launch a simple air app. My issue is I am trying to have ADL launch
    this app from outside of the bin directory of the SDK. Whenever I
    try to pass adl the full path to the Applicaiton.xml file it says
    "application descriptor not found" Does anyone know how to get
    around this? How can I run an AIR app that is outside of the bin?
    My situation C:\AIR has the Applicaiton.xml and Content.swf
    files, then a directory way below C:\Program Files\....\..... has
    the bin directory. I can run adl using its full path C:\Program
    Files\....\bin\adl, but when I pass it the full path for
    Application.xml it fails.
    By the way when I put everything in the bin, or below the bin
    it works just fine.

    If you're receiving this error message then the full path
    you're specifying for application.xml must be incorrect.

  • Installing BDB XML and including it into a java application

    Hi there :)
    I'm new to BDB XML and I've got some questions about it :
    1/ The documentation says about BDB XML that it is based on BDB. Does it mean that I need to install the standard BDB first to use BDB XML ? (I'm pretty sure I don't have to but I would like a confirmation =))
    2/ I want to developp a web application which will use BDB XML. The documentation says I need to add some jars into my project to use it but do I need to install it on my computer (Windows XP) first ? (with the .msi file ?)
    3/ Where will the xml files be physically stored after I add them into the database ? (what is the default database folder on the hard disk ?)
    Thank you for you help :)
    Regards,
    Gary

    Hi Gary,
    1) You need to install only DB XML. BDB is bundled with DB XML, so you don't have to worry.
    2) Yes, you need to add two jars: db.jar and dbxml.jar. But these jars depend on native DB XML libraries, so you will have to install DB XML anyway: only jars wouldn't be sufficient. Moreover, I would recommend to install DB XML from sources providing the --enable-java+ flag to the buildall.sh script
    3) All XML files will be stored in a container or containers (depending on how many of those you will decide to utilize in your application). It is up to you where you are going to reside DB XML environment/containers -- DB XML is quite low-level XML-database.
    Hope this helps,
    Vyacheslav

  • 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"/>?

Maybe you are looking for