Xslt weirdness

I'm attempting to apply an xslt document to a set of results returned from a database adapter. The xslt functions as expected using the test functionality in JDev but doesn't work when deployed.
Essentially I'm trying to apply the xsi:nil="true" returned from the DB adapter to the appropriate elements in my translated document. I've created a little template (shown below) to copy the nil attribute if it's available.
<xsl:template name="copy">
     <xsl:param name="element" />
     <xsl:if test="$element/@xsi:nil='true'">
          <xsl:attribute name="xsi:nil">
               <xsl:value-of select="$element/@xsi:nil"/>
          </xsl:attribute>
     </xsl:if>
     <xsl:value-of select="$element"/>
</xsl:template>
I then call the template from various points within the xslt using the following syntax:
<ns1:rebate>
     <xsl:call-template name="copy">
          <xsl:with-param name="element" select="ns0:VuClientdetailCollection/VuClientdetail/clientRebate" />
     </xsl:call-template>
</ns1:rebate>
Using the following test data:
<ns0:VuClientdetailCollection ...>
<VuClientdetail>
<clientRebate xsi:nil="true" />
</VuClientdetail>
</ns0:VuClientdetailCollection>
When run from JDev the element is correctly translated into:
<ns1:rebate xsi:nil="true">
</ns1:rebate>
But when it's executed from within BPEL the xsl:if statement is incorrectly evaluated as false and the xsi:nil is never added. As far as I can tell it's the "$element/@xsi:nil='true'" expression that's incorrect but I've verified that it works from JDev and Stylus Studio...
This combined with the need to sacrifice a virgin each time you make a change to your xslt document has made for a VERY frustrating morning.
Does anyone have any idea of what's going on?
Cheers,
Dan

Also, this is the output from the DB Adapter:
<messages>
<dbGetClientDetails_dbGetClientDetailsSelect_partyId_InputVariable>
<part name="dbGetClientDetailsSelect_partyId_inparameters" >
<dbGetClientDetailsSelect_partyIdInputParameters>
<partyId>13</partyId>
</dbGetClientDetailsSelect_partyIdInputParameters>
</part>
</dbGetClientDetails_dbGetClientDetailsSelect_partyId_InputVariable>
<dbGetClientDetails_dbGetClientDetailsSelect_partyId_OutputVariable>
<part name="response-headers" >null</part>
<part name="VuClientdetailCollection" >
<n:VuClientdetailCollection>
<VuClientdetail>
<addCity>Sydney</addCity>
<addCountry>Australia</addCountry>
<addL1>C/o Murphys Lawyers</addL1>
<addL2>130 Elizabeth Street</addL2>
<addPostcode>2000</addPostcode>
<addState>NSW</addState>
<clientAbnacn xsi:nil="true" />
<clientAccount>OPTEST1</clientAccount>
<clientAuthrep xsi:nil="true" />
<clientBrokerage xsi:nil="true" />
<clientCoid>92</clientCoid>
<clientCompany xsi:nil="true" />
<clientFirstname xsi:nil="true" />
<clientId>13</clientId>
<clientInterestRate>5.75</clientInterestRate>
<clientLastStatement xsi:nil="true" />
<clientLineFee>7.5</clientLineFee>
<clientName>Client 1</clientName>
<clientPassword xsi:nil="true" />
<clientRebate xsi:nil="true" />
<clientShortFee>10</clientShortFee>
<clientShowBrokerage>Y</clientShowBrokerage>
<clientStatus>ACTIVE</clientStatus>
<clientSurname>Andrew Dorman</clientSurname>
<clientTitle>Lord</clientTitle>
<clientUsername xsi:nil="true" />
<cntEmail>[email protected]</cntEmail>
<cntFax xsi:nil="true" />
<cntMobile>9999 9999 99</cntMobile>
<cntPhone1>1234 5555</cntPhone1>
<cntPhone2>9876 5555</cntPhone2>
<sysAddress>1717</sysAddress>
<sysContact>2529</sysContact>
</VuClientdetail>
</n:VuClientdetailCollection>
</part>
</dbGetClientDetails_dbGetClientDetailsSelect_partyId_OutputVariable>
</messages>
I just want to be able to access the xsi:nil during a transform. I found bug #5191986 on metalink but I'm not sure it's related...

Similar Messages

  • XSLT List View Web part with Inline Editing changing value for one field changes the other lookup field

    Hi
    It's a bit of a weird one. In an XSLT List View web part when Inline editing is enabled if I change the date column, it changes the lookup field column as well. This behavior only occurs if the lookup list has more than 20 entries. Below 20 and we are
    OK.
    Let me explain by example:
    MileStones List - Having more than 20 items
    Tasks List - having a lookup to the Title field from MileStones list. Also having a due date field.
    Simple web part page with one XSLT List View web part for Tasks having inline editing enabled.
    When I edit the first record's due date and press enter (which saves the changes and moves onto next record) and change the due date on second record without even touching the MileStone field. Press enter to commit changes and you see the milestone changing
    on first record!
    The wierd thing is that if the MileStone list has less than 20 items all works as expected.
    Any pointers will be appreciated
    Thanks

    Hi,
    This is a known limitation when working with complex fields like Lookup field.
    A workaround is that we can avoid using the inline edit feature when there are
    complex fields in a list.
    You can take a look at this KB from Microsoft Support to get more details:
    http://support.microsoft.com/kb/2600186/en-us
    A similar thread for your reference:
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/3d369611-ee79-4b5c-86bb-c0f3878cd746/standard-list-view-with-inline-editing-lookup-column-copies-preceding-or-following-items-related?forum=sharepointgeneralprevious
    Thanks
    Patrick Liang
    TechNet Community Support

  • XSLT and Java lookup cache

    Hi,
    I´m trying the "Easy RFC lookup from XSLT mappings using a Java helper class" article and I getting a weird problem.
    The result of the RFC lookup called inside the java class is maintained in a kind of cache and  I always get the same results independent of the parameters I use in the following calls.
    Just after calling a Complete Cache Refresh (SXI_CACHE) I got a new result to the lookup.
    If I call in the Interface Mapping Test option it runs fine. However, when I call it from my scenario (SOAP Adapter Sender) the first result of the lookup will be returned until a forced cache refresh.
    Any ideas?
    Thank you,
    Fabiano.

    Hello Fabiano,
    I had the same problem like you had.
    The main Problem is that with the example code the request variable is created as NodeList object. In XSLT a variable is somekind of a constant and can't be changed. As the request object is empty after the first request the programm fails at the following line:
    Source source = new DOMSource(request.item(0));
    So I've created a workaround for this problem.
    In the call of the template I've put the request as a parameter object at the template call:
    <xsl:with-param name="req">
    <rfc:PLM_EXPLORE_BILL_OF_MATERIAL xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
      <APPLICATION>Z001</APPLICATION>
      <FLAG_NEW_EXPLOSION>X</FLAG_NEW_EXPLOSION>
      <MATERIALNUMBER><xsl:value-of select="value"/></MATERIALNUMBER>
      <PLANT>FSD0</PLANT>
      <VALIDFROM><xsl:value-of select="//Recordset/Row[name='DTM-031']/value"/></VALIDFROM>
      <BOMITEM_DATA/>
    </rfc:PLM_EXPLORE_BILL_OF_MATERIAL>
    </xsl:with-param>
    With this change the request will be provided as a String object and not as a NodeList object.
    Afterwards the RfcLookup.java has to be changed to the following:
    package com.franke.mappings;
    import java.io.ByteArrayInputStream;
    import java.io.ByteArrayOutputStream;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.PrintWriter;
    import java.io.StringWriter;
    import java.util.Map;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    import com.sap.aii.mapping.lookup.Channel;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.lookup.RfcAccessor;
    import com.sap.aii.mapping.lookup.LookupService;
    import com.sap.aii.mapping.lookup.XmlPayload;
    * @author Thorsten Nordholm Søbirk, AppliCon A/S
    * Helper class for using the XI Lookup API with XSLT mappings for calling RFCs.
    * The class is generic in that it can be used to call any remote-enabled
    * function module in R/3. Generation of the XML request document and parsing of
    * the XML response is left to the stylesheet, where this can be done in a very
    * natural manner.
    * TD:
    * Changed the class that request is sent as String, because of IndexOutOfBound-exception
    * When sending multiple requests in one XSLT mapping.
    public class RfcLookup {
         * Execute RFC lookup.
         * @param request RFC request - TD: changed to String
         * @param service name of service
         * @param channelName name of communication channel
         * @param inputParam mapping parameters
         * @return Node containing RFC response
         public static Node execute( String request,
                 String service,
                 String channelName,
                 Map inputParam)
              AbstractTrace trace = (AbstractTrace) inputParam.get(StreamTransformationConstants.MAPPING_TRACE);
              Node responseNode = null;
              try {
                  // Get channel and accessor
                  Channel channel = LookupService.getChannel(service, channelName);
                  RfcAccessor accessor = LookupService.getRfcAccessor(channel);
                   // Serialise request NodeList - TD: Not needed anymore as request is String
                   /*TransformerFactory factory = TransformerFactory.newInstance();
                   Transformer transformer = factory.newTransformer();
                   Source source = new DOMSource(request.item(0));
                   ByteArrayOutputStream baos = new ByteArrayOutputStream();
                   StreamResult streamResult = new StreamResult(baos);
                   transformer.transform(source, streamResult);*/
                    // TD: Add xml header and remove linefeeds for the request string
                    request = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>"+request.replaceAll("[\r\n]+", ""); 
                    // TD: Get byte Array from request String to send afterwards
                    byte[] requestBytes = request.getBytes();
                   // TD: Not used anymore as request is String
                    //byte[] requestBytes = baos.toByteArray();
                    trace.addDebugMessage("RFC Request: " + new String(requestBytes));
                    // Create input stream representing the function module request message
                    InputStream inputStream = new ByteArrayInputStream(requestBytes);
                    // Create XmlPayload
                    XmlPayload requestPayload =LookupService.getXmlPayload(inputStream);
                    // Execute lookup
                    XmlPayload responsePayload = accessor.call(requestPayload);
                    InputStream responseStream = responsePayload.getContent();
                    TeeInputStream tee = new TeeInputStream(responseStream);
                    // Create DOM tree for response
                    DocumentBuilder docBuilder =DocumentBuilderFactory.newInstance().newDocumentBuilder();
                    Document document = docBuilder.parse(tee);
                    trace.addDebugMessage("RFC Response: " + tee.getStringContent());
                    responseNode = document.getFirstChild();
              } catch (Throwable t) {
                   StringWriter sw = new StringWriter();
                   t.printStackTrace(new PrintWriter(sw));
                   trace.addWarning(sw.toString());
              return responseNode;
         * Helper class which collects stream input while reading.
         static class TeeInputStream extends InputStream {
               private ByteArrayOutputStream baos;
               private InputStream wrappedInputStream;
               TeeInputStream(InputStream inputStream) {
                    baos = new ByteArrayOutputStream();
                    wrappedInputStream = inputStream;
               * @return stream content as String
               String getStringContent() {
                    return baos.toString();
              /* (non-Javadoc)
              * @see java.io.InputStream#read()
              public int read() throws IOException {
                   int r = wrappedInputStream.read();
                   baos.write(r);
                   return r;
    Then you need to compile and upload this class and it should work.
    I hope that this helps you.
    Best regards
    Till

  • DB insert using xslt-exception

    Hi
    I am having a weird problem when i am trying to insert values in table using xslt
    my process data object xsd is
    <xsd:element name="data">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="element1" type="dataCollection"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="dataCollection">
    <xsd:sequence>
    <xsd:element name="seqid" type="xsd:string"/>
    <xsd:element name="value" type="xsd:string"/>
    <xsd:element name="description" type="xsd:string"/>
    <xsd:element name="price" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    my database xsd getting generated out db adapter is
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <xs:schema targetNamespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/test" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/top/test" elementFormDefault="qualified" attributeFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Testatble1Collection" type="Testatble1Collection"/>
    <xs:complexType name="Testatble1Collection">
    <xs:sequence>
    <xs:element name="Testatble1" type="Testatble1" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    <xs:complexType name="Testatble1">
    <xs:sequence>
    <xs:element name="id">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="20"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="seqid" minOccurs="0" nillable="true">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="20"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="value" minOccurs="0" nillable="true">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="20"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="description" minOccurs="0" nillable="true">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="20"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    <xs:element name="price" minOccurs="0" nillable="true">
    <xs:simpleType>
    <xs:restriction base="xs:string">
    <xs:maxLength value="20"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    AND my xslt mapping is
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="XSD">
    <schema location="../xsd/test.xsd"/>
    <rootElement name="data" namespace="http://www.example.org"/>
    <param name="dataObject1" />
    </source>
    </mapSources>
    <mapTargets>
    <target type="XSD">
    <schema location="../xsd/test_table.xsd"/>
    <rootElement name="Testatble1Collection" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/test"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.6.0(build 111214.0600.1553) AT [SAT DEC 15 18:10:29 GMT 2012]. -->
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="http://www.example.org"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:med="http://schemas.oracle.com/mediator/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/top/test"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:bpmn="http://schemas.oracle.com/bpm/xpath"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    exclude-result-prefixes="xsi xsl ns0 xsd ns1 bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref bpmn ora socket ldap">
    <xsl:template match="/">
    <ns1:Testatble1Collection>
    <ns1:Testatble1>
    <ns1:seqid>
    <xsl:value-of select="/ns0:data/ns0:element1/ns0:seqid"/>
    </ns1:seqid>
    <ns1:attributevalue>
    <xsl:value-of select="/ns0:data/ns0:element1/ns0:value"/>
    </ns1:attributevalue>
    <ns1:description>
    <xsl:value-of select="/ns0:data/ns0:element1/ns0:description"/>
    </ns1:description>
    <ns1:price>
    <xsl:value-of select="/ns0:data/ns0:element1/ns0:price"/>
    </ns1:price>
    </ns1:Testatble1>
    </ns1:Testatble1Collection>
    </xsl:template>
    </xsl:stylesheet>
    i have used merge statement and every time i run the bpm project i get the error
    <bpelFault><faultType>0</faultType><remoteFault xmlns="http://schemas.oracle.com/bpel/extension"><part name="summary"><summary>oracle.fabric.common.FabricInvocationException: Schema validation failed for message part Testatble1Collection. Please ensure at the message sender level that the data sent is schema compliant. Element 'seqid' not expected.</summary></part><part name="detail"><detail>Element 'seqid' not expected.</detail></part><part name="code"><code>null</code></part></remoteFault></bpelFault>
    this is the most simple db insert and i really dont know hat i have done wrong here.
    pls help i am unable to figure out the problem.i tried typecasting too but it ddnt help.
    Regards...

    Hi Daniel,
    Thanks for your input.I have tried using foreach initially but the problem persists.
    I am pasting my input xml and xslt mapping below
    input xml:
    <?xml version="1.0" encoding="windows-1252" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns="http://www.example.org"
    targetNamespace="http://www.example.org"
    elementFormDefault="qualified">
    <xsd:element name="data">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="element1" type="dataCollection"/>
    <xsd:element name="element2" type="dataCollection"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:complexType name="dataCollection">
    <xsd:sequence>
    <xsd:element name="seqid" type="xsd:string"/>
    <xsd:element name="value" type="xsd:string"/>
    <xsd:element name="description" type="xsd:string"/>
    <xsd:element name="price" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:schema>
    xslt mapping
    <?xml version="1.0" encoding="UTF-8" ?>
    <?oracle-xsl-mapper
    <!-- SPECIFICATION OF MAP SOURCES AND TARGETS, DO NOT MODIFY. -->
    <mapSources>
    <source type="XSD">
    <schema location="../xsd/test.xsd"/>
    <rootElement name="data" namespace="http://www.example.org"/>
    <param name="dataObject1" />
    </source>
    </mapSources>
    <mapTargets>
    <target type="XSD">
    <schema location="../xsd/test_table.xsd"/>
    <rootElement name="Testatble1Collection" namespace="http://xmlns.oracle.com/pcbpel/adapter/db/top/test"/>
    </target>
    </mapTargets>
    <!-- GENERATED BY ORACLE XSL MAPPER 11.1.1.6.0(build 111214.0600.1553) AT [SAT DEC 15 21:04:32 GMT 2012]. -->
    ?>
    <xsl:stylesheet version="1.0"
    xmlns:bpws="http://schemas.xmlsoap.org/ws/2003/03/business-process/"
    xmlns:xp20="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.Xpath20"
    xmlns:mhdr="http://www.oracle.com/XSL/Transform/java/oracle.tip.mediator.service.common.functions.MediatorExtnFunction"
    xmlns:bpel="http://docs.oasis-open.org/wsbpel/2.0/process/executable"
    xmlns:oraext="http://www.oracle.com/XSL/Transform/java/oracle.tip.pc.services.functions.ExtFunc"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:ns0="http://www.example.org"
    xmlns:dvm="http://www.oracle.com/XSL/Transform/java/oracle.tip.dvm.LookupValue"
    xmlns:hwf="http://xmlns.oracle.com/bpel/workflow/xpath"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:med="http://schemas.oracle.com/mediator/xpath"
    xmlns:ids="http://xmlns.oracle.com/bpel/services/IdentityService/xpath"
    xmlns:bpm="http://xmlns.oracle.com/bpmn20/extensions"
    xmlns:ns1="http://xmlns.oracle.com/pcbpel/adapter/db/top/test"
    xmlns:xdk="http://schemas.oracle.com/bpel/extension/xpath/function/xdk"
    xmlns:xref="http://www.oracle.com/XSL/Transform/java/oracle.tip.xref.xpath.XRefXPathFunctions"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:bpmn="http://schemas.oracle.com/bpm/xpath"
    xmlns:ora="http://schemas.oracle.com/xpath/extension"
    xmlns:socket="http://www.oracle.com/XSL/Transform/java/oracle.tip.adapter.socket.ProtocolTranslator"
    xmlns:ldap="http://schemas.oracle.com/xpath/extension/ldap"
    exclude-result-prefixes="xsi xsl ns0 xsd ns1 bpws xp20 mhdr bpel oraext dvm hwf med ids bpm xdk xref bpmn ora socket ldap">
    <xsl:template match="/">
    <ns1:Testatble1Collection>
    <xsl:for-each select="/ns0:data/*">
    <ns1:Testatble1>
    <ns1:seqid>
    <xsl:value-of select="./ns0:seqid"/>
    </ns1:seqid>
    <ns1:attributevalue>
    <xsl:value-of select="./ns0:value"/>
    </ns1:attributevalue>
    <ns1:description>
    <xsl:value-of select="./ns0:description"/>
    </ns1:description>
    <ns1:price>
    <xsl:value-of select="./ns0:price"/>
    </ns1:price>
    </ns1:Testatble1>
    </xsl:for-each>
    </ns1:Testatble1Collection>
    </xsl:template>
    </xsl:stylesheet>
    the same problem persists.
    I tested the same input and xslt mapping for a table which does not have auto-increment primary key through trigger,it works perfectly fine.
    but the same fails when i have a table with auto-increment primary key named 'id' which is inserted as per below sql:
    CREATE TRIGGER TESTTABLE1_TRIG
    BEFORE INSERT ON TESTATBLE1
    FOR EACH ROW
    BEGIN
    SELECT test_seq.NEXTVAL
    INTO :new.id
    FROM dual;
    END;
    is it a really a limitation with soa db adapter or i am doing it wrong.
    Regards...
    Edited by: bpm11gnewbie on Dec 15, 2012 1:15 PM

  • One or two XSLT/XPath bugs

    I have an XSLT problem that may actually be two problems. My stylesheet works as expected in MSXML and Xalan but does very weird things in Oracle's XSLT processor. Below is the stylesheet, followed by some test input. It looks like just one bug if you run it on this test input (the "extra rows" generated get numbered 10-14 rather than 20-24, but $count and $remainder seem to have the right values). If you delete all COWS after SEQNUM 13, however, then $count and $remainder are both wrong. So it may be one bug, may be two.
    XSLT:
    ====================================================
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <!-- output a CHICKENROW for each CHICKEN in the source document, and guarantee there's a positive multiple of 8 rows total -->
         <xsl:template match="/">
              <CHICKENROWS>
                   <xsl:for-each select="/COWS/COW[KEY1 = '1']">
                        <CHICKENROW seqnum="{SEQNUM}">
                             <xsl:value-of select="CHICKEN"/>
                        </CHICKENROW>
                   </xsl:for-each>
                   <xsl:variable name="count" select="count(/COWS/COW[KEY1 = '1'])"/>
                   <!-- uncomment this for debugging
                   <count><xsl:value-of select="$count"/></count>
                   -->
                   <xsl:variable name="remainder" select="$count mod 8"/>
                   <!-- uncomment this for debugging
                   <remainder><xsl:value-of select="$remainder"/></remainder>
                   -->
                   <!-- if we have fewer than a positive multiple of 8 rows, add empty rows -->
                   <xsl:if test="$count = 0 or $remainder &gt; 0">
                        <xsl:variable name="startSeqnum">
                             <xsl:choose>
                                  <xsl:when test="/COWS/COW[KEY1 = '1']/SEQNUM">
                                       <xsl:for-each select="/COWS/COW[KEY1 = '1']/SEQNUM">
                                            <xsl:if test="not(/COWS/COW[KEY1 = '1' and SEQNUM &gt; current()])">
                                                 <xsl:value-of select=". + 1"/>
                                            </xsl:if>
                                       </xsl:for-each>
                                  </xsl:when>
                                  <xsl:otherwise>
                                       <xsl:text>1</xsl:text>
                                  </xsl:otherwise>
                             </xsl:choose>
                        </xsl:variable>
                        <!-- insert as many empty rows as necessary to guarantee we have at least 8 rows and the total # of rows is a multiple of 8 -->
                        <xsl:call-template name="emptyRows">
                             <xsl:with-param name="seqnum" select="$startSeqnum"/>
                             <xsl:with-param name="endSeqnum" select="$startSeqnum + (8 - $remainder) - 1"/>
                        </xsl:call-template>
                   </xsl:if>
              </CHICKENROWS>
         </xsl:template>
         <!--
              Recursively insert empty rows with seqnums starting at $seqnum and going to $endSeqnum
         -->
         <xsl:template name="emptyRows">
              <xsl:param name="seqnum"/>
              <xsl:param name="endSeqnum"/>
              <xsl:if test="$seqnum &lt;= $endSeqnum">
                   <CHICKENROW seqnum= "{$seqnum}"></CHICKENROW>
                   <xsl:call-template name="emptyRows">
                        <xsl:with-param name="seqnum" select="$seqnum + 1"/>
                        <xsl:with-param name="endSeqnum" select="$endSeqnum"/>
                   </xsl:call-template>
              </xsl:if>
         </xsl:template>
    </xsl:stylesheet>
    =======================================================
    INPUT XML:
    =======================================================
    <COWS>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>1</SEQNUM>
              <CHICKEN>ACMI2</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>2</SEQNUM>
              <CHICKEN>ALTE</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>3</SEQNUM>
              <CHICKEN>ANRO2</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>4</SEQNUM>
              <CHICKEN>ARCO5</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>5</SEQNUM>
              <CHICKEN>ARFR4</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>6</SEQNUM>
              <CHICKEN>ARTRV</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>7</SEQNUM>
              <CHICKEN>ASMO7</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>8</SEQNUM>
              <CHICKEN>CAGE2</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>9</SEQNUM>
              <CHICKEN>COUM</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>10</SEQNUM>
              <CHICKEN>ERIOG</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>11</SEQNUM>
              <CHICKEN>FEID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>12</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>13</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>14</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>15</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>16</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>17</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>18</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>19</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
    </COWS>

    ... or maybe they're not bugs at all, but if they're not, they're at least a difference in implementation from MSXML and Xalan. Do I misunderstand the XPath/XSL I'm using here? Is Oracle's interpretation equally valid?

  • XSLT Mapper with BPEL??

    Hi there - I was advised by PeopleSoft tech support that JDeveloper contained an "XSLT generator" where you could put two XML files side by side and drag & drop fields between them to generate XSLT automagically. Turns out this is NOT included in JDeveloper, but I've heard that it is part of BPEL.
    Can anyone confirm this - if so, how would I install BPEL (is it an extension of JDeveloper?)
    Thanks, and forgive my ignorance!
    Cheers, Paul

    Paul:
    BPEL Designer is not part of JDeveloper 10.1.3 EA, but word on the street is that it will be when JDev 10.1.3 goes production. My sense is this might be soon (weeks rather than months) but I have no inside information to that effect, only a nose in the wind...
    When you download the current edition of the Designer, it will come already integrated into JDeveloper 10.1.2. You get the whole kit and kaboodle. I currently have 3 installs of JDeveloper: 1) 10.1.2 standalone, 2) 10.1.2 with BPEL Designer integrated, and 3) 10.1.3 EA. I could probably ditch the first one, but there's something weird about using JDev for non-BPEL work and having the BPEL Designer so prominent in the tool.
    Anyway, blah, blah, blah. Good luck with your exploring.
    Johnny Lee

  • XML Parser for Java v2. Applying XSLT to DOM tree

    I encountered pretty weird behavior of XML Parser for Java v2.
    While applying XSLT to XML document created in memory using DOM
    interface I couldn't access element attributes. For example,
    given the XML document:
    <root>
    <Item ID="00001">Value of Item 00001</Item>
    <Item ID="00002">Value of Item 00002</Item>
    </root>
    and XSLT:
    <xsl:template match="/">
    <HTML>
    <HEAD>
    <TITLE>XSLT Test</TITLE>
    </HEAD>
    <BODY>
    <xsl:for-each select="/Error">
    <H1>Error</H1><xsl:value-of select="."/>
    </xsl:for-each>
    <TABLE border="0" cellspacing="0" cellpadding="2">
    <TBODY>
    <xsl:for-each select="/root">
    <TR>
    <TH style="background-color:khaki">
    <xsl:text>Attribute</xsl:text>
    </TH>
    <TH style="background-color:khaki">
    <xsl:text>Value</xsl:text>
    </TH>
    </TR>
    <xsl:for-each select="Item">
    <TR>
    <TD><xsl:value-of select="@ID"/></TD>
    <TD><xsl:value-of select="."/></TD>
    </TR>
    </xsl:for-each>
    </xsl:for-each>
    </TBODY>
    </TABLE>
    </BODY>
    </HTML>
    </xsl:template>
    If I build DOM tree by parsing XML file the resulting HTML
    document after applying XSLT will display
    Attribute Value
    00001 Value of Item 00001
    00002 Value of Item 00002
    But if I build DOM tree using following code:
    XMLDocument xDoc = new XMLDocument();
    Element root = xDoc.createElement( "root" );
    xDoc.appendChild( root );
    Element elem = xDoc.createElement( "Item" );
    elem.setAttribute( "ID", "00001" );
    root.appendChild( elem ).
    appendChild( xDoc.createTextNode( "Value of Item 00001" ) );
    elem = xDoc.createElement( "Item" );
    elem.setAttribute( "ID", "00002" );
    root.appendChild( elem )
    .appendChild( xDoc.createTextNode( "Value of Item 00002" ) );
    the same XSLT will produce the following HTML output:
    Attribute Value
    Value of Item 00001
    Value of Item 00002
    So the value for the ID attribute is not displayed. At the same
    time I can access this attribute using DOM interface. For
    example, following code
    NodeList nList = xDoc.getElementsByTagName( "Item" );
    Element e;
    for( int i = 0; i < nList.getLength(); i++ )
    e = (Element)nList.item( i );
    System.out.println( "ID: " + e.getAttribute( "ID" ) );
    produces an output
    ID: 00001
    ID: 00002
    Here is the code for applying XSLT to DOM tree:
    DOMParser parser = new DOMParser();
    parser.parse( new FileInputStream( "test.xsl" ) );
    XMLDocument xsldoc = parser.getDocument();
    XSLStylesheet xsl = new XSLStylesheet( xsldoc, createURL( "" ) );
    XMLDocument out = new XMLDocument();
    out.appendChild( new XSLProcessor().processXSL(xsl, xDoc) );
    out.print( new FileOutputStream( "test.html" ) );
    Andrei Filimonov
    null

    We are not getting what you're getting on Solaris. See the
    following:
    Script started on Tue Jun 22 18:53:56 1999
    Processing /view/test/vobs/oracore3/.ndeprodrc.csh
    Processing /private/.nderc.csh
    [test] > cat bruno.xml
    <my_grandpa age="88">
    <my_dad age="66">
    <me age="44">
    <my_son age="22">
    </my_son>
    </me>
    </my_dad>
    </my_grandpa>
    [test] > cat bruno.xsl
    <?xml version="1.0"?>
    <!-- Identity transformation -->
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0">
    <xsl:template match="me">
    <xsl:value-of select="my_son/@age"/>
    <xsl:value-of select="@age"/>
    <xsl:value-of select="../@age"/>
    <xsl:value-of select="../../@age"/>
    </xsl:template>
    </xsl:stylesheet>
    [test] > java XSLSample bruno.xsl bruno.xml
    <root>
    22446688
    </root>
    [test] > exit
    script done on Tue Jun 22 18:54:22 1999
    What platform are you on and does your stylesheet and xml doc
    match ours?
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Bruno Bontempi (guest) wrote:
    : I had a similar problem in accessing element attributes from
    an
    : XSLT sheet.
    : It seems like the processor correctly accesses element
    attributes
    : in the context node, but does not retrieve values of
    attributes
    : outside the context node.
    : For example, for an XML document like:
    : <my_grandpa age="88">
    : <my_dad age="66">
    : <me age="44">
    : <my_son age="22">
    : </my_son>
    : </me>
    : </my_dad>
    : </my_grandpa>
    : and an XSL stylesheet like:
    : <xsl:template match="me">
    : <xsl:value-of select="my_son/@age"/>
    : <xsl:value-of select="@age"/>
    : <xsl:value-of select="../@age"/>
    : <xsl:value-of select="../../@age"/>
    : </xsl:template>
    : I expect an output like:
    : 22446688
    : but all I get is
    : 44
    : I am also using Jim Clark's XT, which is returning the
    expected
    : result.
    : Thanks in advance for your help,
    : Bruno.
    : Andrei Filimonov (guest) wrote:
    : : I encountered pretty weird behavior of XML Parser for Java
    v2.
    : : While applying XSLT to XML document created in memory using
    DOM
    : : interface I couldn't access element attributes. For example,
    : : given the XML document:
    : : <root>
    : : <Item ID="00001">Value of Item 00001</Item>
    : : <Item ID="00002">Value of Item 00002</Item>
    : : </root>
    : : and XSLT:
    : : <xsl:template match="/">
    : : <HTML>
    : : <HEAD>
    : : <TITLE>XSLT Test</TITLE>
    : : </HEAD>
    : : <BODY>
    : : <xsl:for-each select="/Error">
    : : <H1>Error</H1><xsl:value-of select="."/>
    : : </xsl:for-each>
    : : <TABLE border="0" cellspacing="0" cellpadding="2">
    : : <TBODY>
    : : <xsl:for-each select="/root">
    : : <TR>
    : : <TH style="background-color:khaki">
    : : <xsl:text>Attribute</xsl:text>
    : : </TH>
    : : <TH style="background-color:khaki">
    : : <xsl:text>Value</xsl:text>
    : : </TH>
    : : </TR>
    : : <xsl:for-each select="Item">
    : : <TR>
    : : <TD><xsl:value-of select="@ID"/></TD>
    : : <TD><xsl:value-of select="."/></TD>
    : : </TR>
    : : </xsl:for-each>
    : : </xsl:for-each>
    : : </TBODY>
    : : </TABLE>
    : : </BODY>
    : : </HTML>
    : : </xsl:template>
    : : If I build DOM tree by parsing XML file the resulting HTML
    : : document after applying XSLT will display
    : : Attribute Value
    : : 00001 Value of Item 00001
    : : 00002 Value of Item 00002
    : : But if I build DOM tree using following code:
    : : XMLDocument xDoc = new XMLDocument();
    : : Element root = xDoc.createElement( "root" );
    : : xDoc.appendChild( root );
    : : Element elem = xDoc.createElement( "Item" );
    : : elem.setAttribute( "ID", "00001" );
    : : root.appendChild( elem ).
    : : appendChild( xDoc.createTextNode( "Value of Item
    00001" )
    : : elem = xDoc.createElement( "Item" );
    : : elem.setAttribute( "ID", "00002" );
    : : root.appendChild( elem )
    : : .appendChild( xDoc.createTextNode( "Value of Item
    00002" )
    : : the same XSLT will produce the following HTML output:
    : : Attribute Value
    : : Value of Item 00001
    : : Value of Item 00002
    : : So the value for the ID attribute is not displayed. At the
    same
    : : time I can access this attribute using DOM interface. For
    : : example, following code
    : : NodeList nList = xDoc.getElementsByTagName( "Item" );
    : : Element e;
    : : for( int i = 0; i < nList.getLength(); i++ )
    : : e = (Element)nList.item( i );
    : : System.out.println( "ID: " + e.getAttribute( "ID" ) );
    : : produces an output
    : : ID: 00001
    : : ID: 00002
    : : Here is the code for applying XSLT to DOM tree:
    : : DOMParser parser = new DOMParser();
    : : parser.parse( new FileInputStream( "test.xsl" ) );
    : : XMLDocument xsldoc = parser.getDocument();
    : : XSLStylesheet xsl = new XSLStylesheet( xsldoc, createURL
    : : XMLDocument out = new XMLDocument();
    : : out.appendChild( new XSLProcessor().processXSL(xsl, xDoc) );
    : : out.print( new FileOutputStream( "test.html" ) );
    : : Andrei Filimonov
    null

  • 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

  • FileName in ABAP XSLT Mapping

    Dear SDN,
    In an integration scenario we are using sender File Adapter and a  ABAP XSLT Mapping.
    Is there any way to get the source FileName from such mapping.  Im trying to use the adapter-specific message attributes, but it doesn't work, and I didn´t find an example, probably I and doing somthing wrong.
    regards,
    GP

    Thank you for your help,
    I just try to access the adapter-specific attibutes using:
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      xmlns:key="java:com.sap.aii.mapping.api.DynamicConfigurationKey">
    <xsl:variable name="filename"  select="key:create('http://sap.com/xi/XI/System/File', 'Directory')" />
    </xsl:stylesheet>
    but the following error raised:
    <SAP:Stack>Error while calling mapping program YXSLT_TEST (type Abap-XSLT, kernel error ID CX_XSLT_RUNTIME_ERROR) Call of unknown function</SAP:Stack>
    have you had this situation?

  • My Excel with PowerPivots acts weird, it hangs when i try to change font color

    Hi 
    I am facing a weird issue using PowerPivot in my workbook, there is a worksheet named Charts in my workbook and all the charts i am using resides in that worksheet. Whenever i try to change the font color in that sheet, my excel's color palette goes blur
    and then everything just freezes and turns black. This problem is happening only with Charts worksheet, when i try to change the color in other sheets, it works just, the problem is only with Charts sheet. File
    size is 16 MB, there are just 10 pivot tables with some calculations and some calculated fields. There are no add-ins other than PowerPivot. 
    Thanks,
    Shanker

    Hi,
    In regarding of the issue, please provide us more information to assist you better.
    Do you receive any error message?
    Which Excel version are you using?  Excel 2013 or other?
    Which workbook format are you using? XLS or XLSX?
    Are you performing any specific task?
    According to your description, this issue seems only occur with the special worksheet "Charts".
    Firstly, I recommend we copy all of the content to a new/blank Excel file to test.
    If it works fine, this issue might be caused by the "Charts" workbook itself. We'd better check the "Charts" workbook. Or re-build the file with a new workbook.
    If it still makes Excel hang with a new file, this issue might due to the content. Please check the content first.
    Secondly, we could follow below KB to troubleshoot this issue:
    https://support2.microsoft.com/kb/2758592/en-us?wa=wsignin1.0
    Thirdly, if the issue still exists, we may try to collect the Event log and App crash dump file to do advanced troubleshooting.
    Event log:
    http://windows.microsoft.com/en-US/windows7/Open-Event-Viewer
    App crash dump file:
    First enable app crash dump collection by copying following words into notepad, saving it as dump.reg and importing
    it:
    Windows Registry Editor Version 5.00
    [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\Windows Error Reporting\localdumps\EXCEL.EXE]
    "DumpFolder"=hex(2):63,00,3a,00,5c,00,63,00,72,00,61,00,73,00,68,00,64,00,75,\
      00,6d,00,70,00,73,00,00,00
    "DumpCount"=dword:00000010
    "DumpType"=dword:00000001
    "CustomDumpFlags"=dword:00000000
    Then, open Excel
    to repro the issue. If crash issue appeared, please find the crashdump file under c:\.
    To further help you, please upload this file into Skydrive and shared the link here.
    Also, you can try to analyze dump by yourself if you would like to:
    How to analyze app crash dump file:
    http://blogs.technet.com/b/askperf/archive/2007/05/29/basic-debugging-of-an-application-crash.aspx
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • My MacBook was acting weird so I restarted it and when I login a white screen flashes and goes back to the login page. Help?

    My MacBook was acting weird like sometimes I would log on and I wouldn't be able to type my password for a couple seconds,but it usually logged in after that. Then I left my computer open after installing the recent update after that all my applications were not responding. So I shut it down, when I turned it back on about an hour later it went to this loading screen and then to the login like usual. After I tried logging in a white screen flashed and it went back to the login/ password screen like nothing happened. Any ideas on what happened and what I can do to fix it?

    Reinstall OS X;
    Reinstalling Lion/Mountain Lion Without Erasing the Drive
    Boot to the Recovery HD: Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
    Repair the Hard Drive and Permissions: Upon startup select Disk Utility from the main menu. Repair the Hard Drive and Permissions as follows.
    When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list.  In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive.  If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported click on the Repair Permissions button. Wait until the operation completes, then quit DU and return to the main menu.
    Reinstall Lion/Mountain Lion: Select Reinstall Lion/Mountain Lion and click on the Continue button.
    Note: You will need an active Internet connection. I suggest using Ethernet if possible because it is three times faster than wireless.

  • Why does my safari browser frequently gives me a gray screen? I resetted my safari many times and it doesn't help. Also sometimes when I scroll it gives me this weird scrolling effect where everything is either upside or messed up.

    Why does my safari browser frequently gives me a gray screen? I resetted my safari many times and it doesn't help. Also sometimes when I scroll it gives me this weird scrolling effect where everything is either upside or messed up.

    This article is for startup but it might help.  http://support.apple.com/kb/ts2570

  • How can I display XSLT transformer errors on a web page ?

    Hi,
    I have some JSP pages that access DB, create an XML based on DB data and then transform it into HTML through an XSLT stylesheet. Developing the XSL code it's easy to make mistakes and generate errors on trasformation, but what I receive on the web page is only a "Could not compile stylesheet" TransformerConfigurationException, while the real cause of the error is displayed only on tomcat logs. This is the code for transformation:
    static public void applyXSLT(Document docXML, InputStream isXSL, PrintWriter pw) throws TransformerException, Exception {
            // instantiate the TransformerFactory.
            TransformerFactory tFactory = TransformerFactory.newInstance();
            // creates an error listener
            XslErrorListener xel = new XslErrorListener();
            // sets the error listener for the factory
            tFactory.setErrorListener(xel);
            // generate the transformer
            Transformer transformer = tFactory.newTransformer(new SAXSource(new InputSource(isXSL)));
            // transforms the XML Source and sends the output to the HTTP response
            transformer.transform(new DOMSource(docXML), new StreamResult(pw));
    }If an exception is thrown during the execution of this code, its error message is displayed on the web page.
    This is the listener class:
    public class XslErrorListener implements ErrorListener {
        public XslErrorListener() {
        public void warning(TransformerException ex) {
            // logs on error log
            System.err.println("\n\nWarning on XEL: " + ex.getMessage());
        public void error(TransformerException ex) throws TransformerException {
            // logs on error log
            System.err.println("\n\nError on XEL: " + ex.getMessage());
            // and throws it
            throw ex;
        public void fatalError(TransformerException ex) throws TransformerException {
            // logs on error log
            System.err.println("\n\nFatal Error on XEL: " + ex.getMessage());
            // and throws it
            throw ex;
    }When I have an error in the XSL stylesheet (for examples a missing closing tag), I can find on tomcat logs the real cause of the error:
    [Fatal Error] :59:10: The element type "table" must be terminated by the matching end-tag "</table>".
    Error on XEL: The element type "table" must be terminated by the matching end-tag "</table>".but on my web page is reported just the TransformerConfigurationException message that is:
    "Could not compile stylesheet".
    How can I display the real cause of the error directly on the web page?
    Thanks,
    Andrea

    This code is part of a bigger project that let developers edit XSL stylesheets through a file upload on the system and we can't impose the use of any tool for checking the xsl. So, I need to display the transformer error on the web page.I see. This code is part of an editorial/developmental tool for developers to create and edit XSL stylesheets.
    As part of the editorial process, XSL errors during editing can be considered a normal condition. In other words, it is normal to expect that the developers will generate XSL errors as they are developing stylesheets.
    In this light, handling the XSL transformation errors is a business requirement that you need to handle. Using the Java Exceptions mechanisms, e.g. try / catch are inappropriate to handle business requirements, in my opinion.
    I suggest that you look at how you handle the occurence of XSL errors differently than what you currently have. You need to:
    (1) capture the Transformation exception on the server;
    (2) extract the message from the exception and put it into a message that can be easily understood by the user;
    The current error message that you have going to the web browser is not useful.
    And you should not have the Transformation exception sent to the web browser either.
    What you are attempting to do with the exception is not appropriate.
    Handle the Transformation exception on the Business tier and use it to create a useful message that is then sent to the Presentation tier. In other words, do not send Java exceptions to web browser.
    />

  • Creative Sync Manager weird bug (featur

    Hi,
    I'm a new Zen Touch 20GB owner although I've been an avid 3G iPod owner before it died on me some time ago. Anyway, I love my new Zen Touch for what it worth but if only if the bundled software would perform better. Well, first of all, I find Creative MediaSource Organizer to be quite a decent audio player despite the weird 4-panes navigation scheme. I have no problem with it yet though.
    However, the accompanying sync plugin/module for my Zen Touch is very disappointing.
    Before I start ranting, here are some details:
    Mp3 Player:
    Zen Touch 20GB
    Date of purchase: 0/2/2005
    Firmware: 2.0.05 (PlayForSure)
    Creative MediaSource:
    Version 3.30.2 with updated driver for PlayForSure-enabled Zen Touch
    Now back to the issue. First, it takes more than 0 seconds to initialise. Loading a big chunk of drivers for all MP3 players Creative have ever produced or what? Second, it doesn't have an option to delete files in my zen player which are not in my PC library. Third, it REFUSES TO REPLACE MP3 files that are already in the player eventhough the files are listed before the syncing procedure. You see, I edit ID3 tags of my music collection all the time so it is natural for me to have my modified ID3 tags to reflect on the files on my Zen Touch as well. OK sure, when I fire up the sync manager, it manages to detect that I have all these files with updated ID3 tags needed to be copied over to my Zen Touch but why in the name of creativity wouldn't it copy the files just like it should do? The files are already in my Zen Touch? Just replace them! I know what I want to do so just replace them! Or at least give me the "Do you want to replace the files?" box with "Yes" or "No" button. Why do I have to go into the directory structure of my zen player and delete the files manually in order to get the latest files copied over?
    I hope this issue is fixed soon. Don't give me those "download the freeware NomadSync etc" advices. Why bother releasing the bundled software if it cannot do such a simple job of replacing files already in the player.
    p/s: I read the "read before you post" post and I already did some searches in the forum for previously posted posts on the issue above but it seems that I'm the first one to discover it. Or maybe everyone else just doesn't care and decided to suck it up?Message Edited by anatilmizun on -09-2005 02:57 AM

    well, I don't mind having to use other program for not-so-common jobs, but this is about replacing/overwriting files that are already in the player. I did mention that the sync manager is smart enough to make a list of files that it thinks should be synced to my zen touch but why won't it copy the files over? Isn't it weird if you sit and think about it's Isn't the real purpose of sync manager to copy files from PC to Zen or vice versa so that both places have the exact set of files? So what if the destination already has the files? The files are different, as detected by sync manager, so it should just overwrite them. It is the basic job the Sync Manager is supposed to do, isn't it's Why should I use another program?
    It's like sync manager saying "hey, I think the files X, Y and Z in your MP3 player are outdated so I am going to sync them. WHoaaaa! There are already X, Y and Z in your MP3 player so I'm going to leave them alone" Sense any weirdness or craziness about this hypotethic monologue?Message Edited by anatilmizun on -0-2005 0:09 AM

  • Weird error message from aplay

    Got a new system this week and everything is set up and working, except a few weird audio glitches.  Audio goes through the onboard HDMI thingie, but I'm not using HDMI; my monitor sends the HDMI signal to a different computer and VGA to my problem child.  So HDMI audio is inactive.  I finally got alsa and all the other audio apps to stop trying to use the nonexistent HDMI by default (resulting in a segfault) by simply deleting that module from libs/modules/{...}  I set up /etc/asound.conf to identify the analog PCM as the default (card 2).  But there's a further complication.  I also have an external sound adapter plugged into USB for my podcast work, and it shows up as card #1.
    Anyway, thanks to the default settings in asound.conf I can get most programs to send output to the analog onboard card and external speakers.  But when I try to play a wave file with aplay, I get
    aplay: set_params:1081: Sample format non available
    That message came up in another thread in 2007, and the solution was to install an updated set of alsa-plugins... but pacman says mine are up to date and I assume any problem with them in 2007 is no longer an issue -- at any rate, aplay worked fine with wave files on my old PC.  mpg123 plays mp3 files fine, and mplayer handles wave files (et al) fine... it's just aplay that's giving me grief.
    I do *not* run jack, except during my podcast because idjc requires it.
    Anyone else familiar with that error and can recommend a fix?

    gday Andrew -
    I believe that this is caused by setting the attribute exclusive-write-access=false in the orion-ejb-jar.xml file for your EJBs.
    This is a known OC4J problem: a bug has been logged and it's been fixed here. The next minor release of OC4J will contain the fix for this.
    In the meantime as a workaround removing the exclusive-write-access=false attribute from the orion-ejb-jar.xml files for your beans should get you going.
    cheers!
    -steve.
    null

Maybe you are looking for

  • New Ipod 60gig...can't get any video's on it

    I just bought a new Ipod 60 gig last night, under the assumption that i could play video's on it. In Itunes when I right click and go to my Ipod Options, I can sync up songs, pictures, but ALL the options under Video are greyed out. If I drag a Video

  • Posting Run reversal

    I am an FI/CO guy and not that familiar with HR module. We are trying to reverse an AP document that was posted from HR. When I tried to reverse the AP document it gave an error "Document was not posted in FI and hence not possible to reverse". So I

  • Require help in ifogroup

    Hi , Pls urgently ,i need help to configure -- Termination and  Leaving aciton , so i need help , which infotypes should be attache in thease actions or also  MOD like (INS, cop) ,. rgrds RJ

  • Computer won't recognize ipod

    We had work done to our computer and they had to take everything off the computer and reload the operating system. My itunes were restored, but when I connect my ipod the computer won't recognize my ipod and the songs I recently downloaded from the i

  • How to disable security alert  coming from ssl?

    Hello friends, I am developing an internal site for which i am using SSL for the security of the data. But i am getting security alert because iam using an IP address or machine short name in the URL to access it. Any other way to disable this alert.