XSL Transformation breaks encoding declaration

The first line in my XML:
<?xml version="1.0" encoding="ISO-8859-1"?>
The first line in my XSL:
<?xml version="1.0" encoding="ISO-8859-1"?>
Once I do the transformation, I end up with this in my XSL-FO
file:
<?xml version="1.0" encoding="ISO8859-1"?> where it
should be ISO-8859-1.

You need to watch out for the namespace in the source document:
You can either specify the namespace and use it when locating paths in the source document (as below) or specify it as the default namespace.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     version="1.0"
     xmlns:xalan="http://xml.apache.org/xslt"
     xmlns:n="http://sirius/xml/common">
<xsl:template match="/">          
     <SiebelMessage IntObjectFormat="Siebel Hierarchical" IntObjectName="TBS2 OHS Reply" MessageType="Integration Object">
          <TBS2OHSReply>                    
               <OrderEntry-Orders>                         
                    <BackOfficeErrorText><xsl:value-of select="n:OrderResponseComplex/n:RejectionReasonCode"/></BackOfficeErrorText>
                    <Status><xsl:value-of select="n:OrderResponseComplex/n:AcceptedIndicator"/></Status>
               </OrderEntry-Orders>
          </TBS2OHSReply>
     </SiebelMessage>
</xsl:template>
</xsl:stylesheet>

Similar Messages

  • ' Displays after XSL Transform

    I am converting Oracle XMLDB XMLSchema registered XML documents in an XMLTYPE table into HTML by using the database XSLT engine. The characters for & and quote(') are stored in the document as &amp; and &apos;. Unfortunately, after the transformation to HTML these characters display in a browser window (IE6) as &amp; and &apos; instead of as '&' and single quote('). This appears to be due to the fact that HTML does not recognise &amp; or &apos; but will correctly render &#38; and &#39; as '&' and single quote('). I would like to record these characters in my XML documents in XML DB as &#38; and &#39; so they display correctly when rendered to the web. Oracle's XML parser always seems to swap these for &amp; and &apos; whenever I do an XML document update.
    Can anyone tell me if there is another approach to getting & and single quote to display properly after an XSLT transformation to HTML?
    For reference sake our XML documents are stored in Oracle XMLDB (v9.2.0.5 on Solaris) with encode="ISO-8859-1" and we are doing the transformation in the database with the following code:
    CREATE OR REPLACE FUNCTION get_cu_xml(
    p_unitset_id IN NUMBER,
    p_year IN NUMBER)
    RETURN VARCHAR2
    IS
    CURSOR get_xml_cur(
    p_unitset_id NUMBER,
    p_year NUMBER)
    IS
    SELECT extract(VALUE(p),'/UnitSetYear')
    FROM cu_unit_set_years_xml p
    WHERE extractValue(VALUE(p),'/UnitSetYear/UnitSetID') = p_unitset_id
    AND extractValue(VALUE(p),'/UnitSetYear/Year') = p_year;
    xml_doc xmltype;
    xsl_clob CLOB;
    xml_clob CLOB;
    myParser dbms_xmlparser.Parser;
    indomdoc dbms_xmldom.domdocument;
    xsltdomdoc dbms_xmldom.domdocument;
    xsl dbms_xslprocessor.stylesheet;
    outdomdocf dbms_xmldom.domdocumentfragment;
    outnode dbms_xmldom.domnode;
    proc dbms_xslprocessor.processor;
    buf CLOB;
    BEGIN
    OPEN get_xml_cur(
    p_unitset_id,
    p_year);
    FETCH get_xml_cur INTO xml_doc;
    IF (get_xml_cur%FOUND) THEN
    xml_clob := xml_doc.getClobVal();
    xsl_clob := UriFactory.getUri('/home/cu/xsl/UMDetail.xslt').getXML().getClobVal();
    myParser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseBuffer(myParser, xml_clob);
    indomdoc := dbms_xmlparser.getDocument(myParser);
    dbms_xmlparser.parseBuffer(myParser, xsl_clob);
    xsltdomdoc := dbms_xmlparser.getDocument(myParser);
    xsl := dbms_xslprocessor.newstylesheet(xsltdomdoc, '');
    proc := dbms_xslprocessor.newProcessor;
    --apply stylesheet to DOM document
    outdomdocf := dbms_xslprocessor.processxsl(proc, xsl, indomdoc);
    outnode := dbms_xmldom.makenode(outdomdocf);
    -- PL/SQL DOM API for XMLType can be used here
    dbms_xmldom.writetoclob(outnode, buf);
    RETURN (buf);
    ELSE
    CLOSE get_xml_cur;
    RETURN (NULL);
    END IF;
    end get_cu_xml;

    Jinyu this is almost as if I need a disable-output-escaping="no" attribute for <xsl:for-each> but that appears not to be supported. The main section concerned in the xsl are the lines:
    <xsl:for-each select="n1:Desc">
    <xsl:apply-templates/>
    </xsl:for-each>
    The content in the Desc tag was edited with an XML editor which replaces quote characters with &apos;
    The full text of my xsl file is as follows:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:n1="http://www.utas.edu.au/cu" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <xsl:output version="1.0" encoding="utf-8" omit-xml-declaration="no" indent="no" media-type="text/html"/>
         <xsl:template match="/">
              <html>
                   <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
                   <head/>
                   <body>
                        <xsl:for-each select="n1:UnitSetDetails">
                             <h1 align="center">
                                  <xsl:for-each select="n1:UnitSetLabel">
                                       <xsl:apply-templates/>
                                  </xsl:for-each>&#160;<xsl:for-each select="n1:UnitSetTitle">
                                       <xsl:apply-templates/>
                                  </xsl:for-each>
                             </h1>
                             <xsl:if test="n1:UnitMembers/n1:UnitMember[1]/n1:FPTime != n1:UnitMembers/n1:UnitMember[2]/n1:FPTime">
                                  <h2 align="center">
                                       <xsl:for-each select="n1:UnitMembers">
                                            <xsl:for-each select="n1:UnitMember">
                                                 <xsl:for-each select="n1:UnitCode">
                                                      <xsl:apply-templates/>
                                                 </xsl:for-each>(<xsl:for-each select="n1:FPTime">
                                                      <xsl:apply-templates/>
                                                 </xsl:for-each>)&#160; </xsl:for-each>&#160;</xsl:for-each>
                                  </h2>
                             </xsl:if>
                             <p>
                                  <xsl:if test="string-length( n1:SpecialNote ) &gt; 0">
                                       <span style="font-weight:bold; ">SPECIAL NOTE:</span>&#160;<xsl:for-each select="n1:SpecialNote">
                                            <xsl:apply-templates/>
                                       </xsl:for-each>
                                  </xsl:if>
                             </p>
                             <p>
                                  <span style="font-weight:bold; ">OFFERINGS</span>
                                  <table bgcolor="#F3F3F3" border="1" cellpadding="5" cellspacing="0" width="500">
                                       <tbody>
                                            <tr>
                                                 <td width="535">
                                                      <xsl:if test="n1:Offered = &apos;N&apos;">Not Offered</xsl:if>
                                                      <xsl:if test="n1:Offered = &apos;Y&apos;">
                                                           <xsl:for-each select="n1:UnitMembers">
                                                                <table border="0" cellspacing="1">
                                                                     <thead>
                                                                          <tr bgcolor="silver">
                                                                               <td width="35">Unit</td>
                                                                               <td align="left" width="55">Sem 1</td>
                                                                               <td align="left" width="55">Sem 2</td>
                                                                               <td align="left" width="55">Full Yr</td>
                                                                               <td align="left" width="55">Spring</td>
                                                                               <td align="left" width="55">Summer</td>
                                                                               <td align="left" width="55">Winter</td>
                                                                          </tr>
                                                                     </thead>
                                                                     <tbody>
                                                                          <xsl:for-each select="n1:UnitMember">
                                                                               <tr>
                                                                                    <td width="35">
                                                                                         <xsl:for-each select="n1:UnitCode">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                                    <td align="left" width="55">
                                                                                         <xsl:for-each select="n1:Sem1">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                                    <td align="left" width="55">
                                                                                         <xsl:for-each select="n1:Sem2">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                                    <td align="left" width="55">
                                                                                         <xsl:for-each select="n1:SemF">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                                    <td align="left" width="55">
                                                                                         <xsl:for-each select="n1:Sem5">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                                    <td align="left" width="55">
                                                                                         <xsl:for-each select="n1:Sem3">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                                    <td align="left" width="55">
                                                                                         <xsl:for-each select="n1:Sem4">
                                                                                              <xsl:apply-templates/>
                                                                                         </xsl:for-each>
                                                                                    </td>
                                                                               </tr>
                                                                          </xsl:for-each>
                                                                     </tbody>
                                                                </table>
                                                           </xsl:for-each>
    Offered in Courses: <xsl:for-each select="n1:OfferedInCourses">
                                                                <xsl:apply-templates select="n1:Course"/>
                                                           </xsl:for-each>
                                                      </xsl:if>
                                                 </td>
                                            </tr>
                                       </tbody>
                                  </table>
                             </p>
                             <p>
                                  <span style="font-weight:bold; ">DESCRIPTION</span>
                                  <xsl:for-each select="n1:Desc">
                                       <xsl:apply-templates/>
                                  </xsl:for-each>
                             </p>
                             <p>
                                  <span style="font-weight:bold; ">WEIGHT:</span>&#160;<xsl:for-each select="n1:UnitMembers">
                                       <xsl:for-each select="n1:UnitMember">
                                            <xsl:for-each select="n1:UnitCode">
                                                 <xsl:apply-templates/>
                                            </xsl:for-each>&#160;<xsl:for-each select="n1:DefaultWeight">(<xsl:apply-templates/>%)</xsl:for-each>&#160;&#160;&#160;&#160; </xsl:for-each>
                                  </xsl:for-each>
                             </p>
                             <xsl:if test="string-length( n1:Assess ) &gt; 0">
                                  <p>
                                       <span style="font-weight:bold; ">ASSESSMENT: </span>
                                       <xsl:for-each select="n1:Assess">
                                            <xsl:apply-templates/>
                                       </xsl:for-each>
                                  </p>
                             </xsl:if>
                             <xsl:if test="string-length( n1:TeachPattern ) &gt; 0">
                                  <p>
                                       <span style="font-weight:bold; ">TEACHING PATTERN: </span>
                                       <xsl:for-each select="n1:TeachPattern">
                                            <xsl:apply-templates/>
                                       </xsl:for-each>
                                  </p>
                             </xsl:if>
                             <xsl:if test="string-length( n1:UnitMembers/n1:UnitMember/n1:WebSup ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:WebDep ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:FullOn ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:ResSupTL ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:ResDepTL ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:VideoConf ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:FlexSched ) &gt; 0
    or string-length( n1:UnitMembers/n1:UnitMember/n1:WPLearn ) &gt; 0">
                                  <p>
                                       <span style="font-weight:bold; ">FLEXIBLE &amp; ONLINE STUDY OPTIONS</span>
                                       <span style="font-weight:bold; ">Note:</span> Class attendance may still be required
                                       <xsl:for-each select="n1:UnitMembers">
                                            <xsl:for-each select="n1:UnitMember">
                                                 <xsl:for-each select="n1:UnitCode">
                                                      <xsl:apply-templates/>
                                                 </xsl:for-each>
                                                 <xsl:if test="string-length( n1:WebSup ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Web supported - <xsl:for-each select="n1:WebSup">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    Online access to some part of this unit online is optional
    </xsl:if>
                                                 <xsl:if test="string-length( n1:WebDep ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Web dependent - <xsl:for-each select="n1:WebDep">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    Some parts of this unit will be taught online
    </xsl:if>
                                                 <xsl:if test="string-length( n1:FullOn ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Fully online - <xsl:for-each select="n1:FullOn">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    This unit is taught entirely online
    </xsl:if>
                                                 <xsl:if test="string-length( n1:ResSupTL ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Resource supported teaching &amp; learning - <xsl:for-each select="n1:ResSupTL">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    Additional resources are provided for your optional use; e.g. video taped lectures
    </xsl:if>
                                                 <xsl:if test="string-length( n1:ResDepTL ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Resource dependent teaching &amp; learning - <xsl:for-each select="n1:ResDepTL">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    Independent study with provided resources replaces face-to-face or other classes (e.g. lectures)
    </xsl:if>
                                                 <xsl:if test="string-length( n1:VideoConf ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Video conferencing - <xsl:for-each select="n1:VideoConf">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    A live video link between campuses is used for at least some teaching in this unit
    </xsl:if>
                                                 <xsl:if test="string-length( n1:FlexSched ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Flexible scheduling - <xsl:for-each select="n1:FlexSched">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    You can attend some classes out of normal teaching hours; e.g. weekend blocks, summer schools etc
    </xsl:if>
                                                 <xsl:if test="string-length( n1:WPLearning ) &gt; 0">
    &#160; <img border="0">
                                                           <xsl:attribute name="src"><xsl:text disable-output-escaping="yes">http://www.utas.edu.au/courses/images/dotarrowB.gif</xsl:text></xsl:attribute>
                                                      </img>&#160;Workplace learning - <xsl:for-each select="n1:WPLearn">
                                                           <xsl:apply-templates/>
                                                      </xsl:for-each>
    This unit involves study in the workplace
    </xsl:if>
                                            </xsl:for-each>
                                       </xsl:for-each>
                                       About Flexible Study Options
                                  </p>
                             </xsl:if>
                             <xsl:if test="count( /n1:UnitSetDetails/n1:Requisites/n1:Requisite ) &gt; 0">
                                  <p>
                                       <xsl:for-each select="n1:Requisites">
                                            <span style="font-weight:bold; ">REQUISITE INFO</span>
                                            <table border="0" cellpadding="3" cellspacing="0">
                                                 <tbody>
                                                      <xsl:for-each select="n1:Requisite">
                                                           <tr>
                                                                <td>
                                                                     <xsl:for-each select="n1:ReqType">
                                                                          <xsl:choose>
                                                                               <xsl:when test=".='PREREQ'">
                                                                                    <xsl:text>Prereq</xsl:text>
                                                                               </xsl:when>
                                                                               <xsl:when test=".='COREQ'">
                                                                                    <xsl:text>Coreq</xsl:text>
                                                                               </xsl:when>
                                                                               <xsl:when test=".='MEXCL'">
                                                                                    <xsl:text>M.Excl</xsl:text>
                                                                               </xsl:when>
                                                                          </xsl:choose>
                                                                     </xsl:for-each>
                                                                </td>
                                                                <td>
                                                                     <xsl:for-each select="n1:ReqText">
                                                                          <xsl:apply-templates/>
                                                                     </xsl:for-each>
                                                                </td>
                                                           </tr>
                                                      </xsl:for-each>
                                                 </tbody>
                                            </table>
                                       </xsl:for-each>
                                  </p>
                             </xsl:if>
                             <xsl:if test="string-length( n1:RequiredTexts/n1:RequiredText ) &gt; 0 or string-length( n1:RecommendedTexts/n1:RecommendedText ) &gt; 0">
                                  <p>
                                       <span style="font-weight:bold; ">TEXTS</span>
                                       <xsl:if test="string-length( n1:RequiredTexts/n1:RequiredText ) &gt; 0">
                                            <xsl:for-each select="n1:RequiredTexts">
                                                 <span style="font-weight:bold; ">Required</span>
                                                 <xsl:for-each select="n1:RequiredText">
                                                      <xsl:apply-templates/>
                                                 </xsl:for-each>
                                            </xsl:for-each>
                                       </xsl:if>
                                       <xsl:if test="string-length( n1:RecommendedTexts/n1:RecommendedText ) &gt; 0">
                                            <xsl:for-each select="n1:RecommendedTexts">
                                                 <span style="font-weight:bold; ">Recommended Texts</span>
                                                 <xsl:for-each select="n1:RecommendedText">
                                                      <xsl:apply-templates/>
                                                 </xsl:for-each>
                                            </xsl:for-each>
                                       </xsl:if>
                                  </p>
                             </xsl:if>
                             <xsl:if test="string-length( n1:Staff ) &gt; 0">
                                  <p>
                                       <span style="font-weight:bold; ">STAFF: </span>
                                       <xsl:for-each select="n1:Staff">
                                            <xsl:apply-templates/>
                                       </xsl:for-each>
                                  </p>
                             </xsl:if>
                        </xsl:for-each>
                   </body>
              </html>
         </xsl:template>
         <xsl:template match="n1:Bold">
              <span style="font-weight:bold; ">
                   <xsl:apply-templates/>
              </span>
         </xsl:template>
         <xsl:template match="n1:BulletList">
              <ul style="margin-bottom:0; margin-top:0; " start="1" type="disc">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ul>
         </xsl:template>
         <xsl:template match="n1:BulletedList">
              <ul style="margin-bottom:0; margin-top:0; " start="1" type="disc">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ul>
         </xsl:template>
         <xsl:template match="n1:Course">
         [<a>
                   <xsl:attribute name="href"><xsl:text disable-output-escaping="yes">/pls/portal/url/page/COURSE_UNIT/UTAS_COURSE_DETAIL?P_COURSE_CODE=</xsl:text><xsl:value-of select="."/></xsl:attribute>
                   <xsl:apply-templates/>
              </a>
              <xsl:text disable-output-escaping="yes">] </xsl:text>
         </xsl:template>
         <xsl:template match="n1:Italic">
              <span style="font-style:italic; ">
                   <xsl:apply-templates/>
              </span>
         </xsl:template>
         <xsl:template match="n1:ListBullet">
              <ul style="margin-bottom:0; margin-top:0; " start="1" type="disc">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ul>
         </xsl:template>
         <xsl:template match="n1:ListLetter">
              <ol style="margin-bottom:0; margin-top:0; " start="1" type="a">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ol>
         </xsl:template>
         <xsl:template match="n1:ListNumber">
              <ol style="margin-bottom:0; margin-top:0; " start="1" type="1">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ol>
         </xsl:template>
         <xsl:template match="n1:ListRoman">
              <ol style="margin-bottom:0; margin-top:0; " start="1" type="i">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ol>
         </xsl:template>
         <xsl:template match="n1:NumberedList">
              <ol style="margin-bottom:0; margin-top:0; " start="1" type="1">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ol>
         </xsl:template>
         <xsl:template match="n1:Unit">
              <xsl:if test="string-length(.) &gt; 0">
                   <a>
                        <xsl:attribute name="href"><xsl:text disable-output-escaping="yes">/pls/portal/url/page/COURSE_UNIT/UTAS_UNIT_DETAIL?P_UNIT_CODE=</xsl:text><xsl:value-of select="."/></xsl:attribute>
                        <xsl:apply-templates/>
                   </a>
              </xsl:if>
         </xsl:template>
         <xsl:template match="n1:ol">
              <ol style="margin-bottom:0; margin-top:0; " start="1" type="1">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ol>
         </xsl:template>
         <xsl:template match="n1:para">
              <p style="padding-bottom:0; padding-top:0; ">
                   <xsl:apply-templates/>
              </p>
         </xsl:template>
         <xsl:template match="n1:table">
              <xsl:apply-templates/>
         </xsl:template>
         <xsl:template match="n1:ul">
              <ul style="margin-bottom:0; margin-top:0; " start="1" type="disc">
                   <xsl:for-each select="n1:li">
                        <li>
                             <xsl:apply-templates/>
                        </li>
                   </xsl:for-each>
              </ul>
         </xsl:template>
    </xsl:stylesheet>

  • XSL Transformation between arrays

    Dear all
    I create to XSD for my variables:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ns="http://www.asre-andishe.com/Inspec/General"
    targetNamespace="http://www.asre-andishe.com/Inspec/General"
    elementFormDefault="qualified">
    <xsd:complexType name="AgentArrayType">
    <xsd:sequence>
    <xsd:element name="Agent" type="ns:AgentType" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:complexType name="AgentType">
    <xsd:sequence>
    <xsd:element name="user" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="Agent" type="ns:AgentType"></xsd:element>
    <xsd:element name="AgentsArray" type="ns:AgentArrayType"></xsd:element>
    </xsd:schema>
    and the other one:
    <?xml version="1.0" encoding="UTF-8" ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:ns="http://www.asre-andishe.com/Inspec/DetermineInspec/retrive/relam"
    targetNamespace="http://www.asre-andishe.com/Inspec/DetermineInspec/retrive/relam"
    elementFormDefault="qualified">
    <xsd:complexType name="RelamAgentType">
    <xsd:sequence>
    <xsd:element name="user" type="xsd:string" maxOccurs="unbounded"/>
    </xsd:sequence>
    </xsd:complexType>
    <xsd:element name="RelamAgents" type="ns:RelamAgentType"></xsd:element>
    </xsd:schema>
    I create two empty variable and then initialized the second variable
    <RelamAgents>
    <user>john</user>
    <user>david</user>
    <user>jack</user>
    </RelamAgents>
    after that i use a transformation XSL and the second variable has been filled without no problem.
    <AgentsArray>
    <ns0:Agent>
    <ns0:user>john</ns0:user>
    </ns0:Agent>
    <ns0:Agent>
    <ns0:user>david</ns0:user>
    </ns0:Agent>
    <ns0:Agent>
    <ns0:user>jack</ns0:user>
    </ns0:Agent>
    </AgentsArray>
    but when i fill the first variable by receiving the output parameter from a service call, the XSL transformation did not work at all and the second variable remains empty.
    I have checked the first variable and i am sure that it is not null and it has the same vale:
    <RelamAgents>
    <user>john</user>
    <user>david</user>
    <user>jack</user>
    </RelamAgents>
    Would anybody please help me with this problem?
    Thank you very much

    Hi,
    receiving the output parameter from a service call, the XSL transformation did not workNamespaces... Check the namespaces the service call is using and see if they match with the XSL is expecting...
    Cheers,
    Vlad

  • XSL Transformation enconding problem?

    Hi everybody.
    I have a strange problem with JDev 9.0.2.829 concerning XSL Transformation:
    I just tried to make the step from JDev 3.2.3 to 9i, imported my existing project and set up JDev 9 for use with XalanJ2 and Xerces2. Everything works fine except:
    If I transform XML data to HTML that contains characters with an ASCII code >127 the whole string appears multiple times (2x or 3x) in the generated HTML.
    The data is read from an Oracle DB with UTF8 encoding, all my stylesheets and JSPs are UTF-8 encoded. JDev9 is set to use UTF-8 encoding.
    No compilation errors, no warnings.
    The same code and stylesheets work perfectly in JDev 3.2.3, deployed into Topmcat 4.0.4 and IBM WebSphere 3.5.4.
    What am I missing?
    Thanks in advance!
    Ralf Steppacher

    OK, I found the culprit.
    The JSPWriter is broken and produces the faulty output when fed with UTF-8 encoded character data. The problem disappears when all character data is buffered in a ByteArrayOutputStream first (without a special encodung schema given) and then written as a string through the JSPWriter.
    Ralf

  • XSL Transformation - cut asx:abap and asx:values

    Hey all,
    I'm using a XSL Transformation to create a XML-File from an internal table.
    My problem is, that the transformation automatically puts the two tags "<asx:abap xmlns:asx="http://www.sap.com/abapxml">" and "<asx:values>" at the beginning of my file (or string):
    <?xml version="1.0" encoding="iso-8859-1" ?>
    <asx:abap xmlns:asx="http://www.sap.com/abapxml">
    <asx:values>
    <ROOT>
    </ROOT>
    </asx:values>
    </asx:abap>
    Does anyone have any idea how I can easily suppress these lines?
    The best course would be of course an XSL statement.
    Thanks and regards,
    Martin.

    Will using a Simple Transformation help your case ?

  • XSL transformation never works on Websphere 5

    I'm doing a xsl transformation on websphere 5 and this xsl never finds the right values. When I run the exact same transformation with the same source, it finds all the values, but on the server it just return empty tags. Why? And how do I fix this?
    Source xml:
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <n:OrderResponseComplex xmlns:n="http://sirius/xml/common">
         <n:AcceptedIndicator>Akseptert</n:AcceptedIndicator>
         <n:RejectionReasonCode>0</n:RejectionReasonCode>
    </n:OrderResponseComplex>XSL transformation:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:xalan="http://xml.apache.org/xslt">
         <xsl:template match="/">
              <SiebelMessage IntObjectFormat="Siebel Hierarchical" IntObjectName="TBS2 OHS Reply" MessageType="Integration Object">
                   <TBS2OHSReply>
                        <OrderEntry-Orders>
                             <BackOfficeErrorText><xsl:value-of select="OrderResponseComplex/RejectionReasonCode"/></BackOfficeErrorText>
                             <Status><xsl:value-of select="OrderResponseComplex/AcceptedIndicator"/></Status>
                        </OrderEntry-Orders>
                   </TBS2OHSReply>
              </SiebelMessage>
         </xsl:template>
    </xsl:stylesheet>Result xml:
    <?xml version="1.0" encoding="UTF-8"?>
    <SiebelMessage MessageType="Integration Object" IntObjectName="TBS2 OHS Reply" IntObjectFormat="Siebel Hierarchical">
         <TBS2OHSReply>
              <OrderEntry-Orders>
                   <BackOfficeErrorText/>
                   <Status/>
              </OrderEntry-Orders>
         </TBS2OHSReply>
    </SiebelMessage>

    You need to watch out for the namespace in the source document:
    You can either specify the namespace and use it when locating paths in the source document (as below) or specify it as the default namespace.
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
         version="1.0"
         xmlns:xalan="http://xml.apache.org/xslt"
         xmlns:n="http://sirius/xml/common">
    <xsl:template match="/">          
         <SiebelMessage IntObjectFormat="Siebel Hierarchical" IntObjectName="TBS2 OHS Reply" MessageType="Integration Object">
              <TBS2OHSReply>                    
                   <OrderEntry-Orders>                         
                        <BackOfficeErrorText><xsl:value-of select="n:OrderResponseComplex/n:RejectionReasonCode"/></BackOfficeErrorText>
                        <Status><xsl:value-of select="n:OrderResponseComplex/n:AcceptedIndicator"/></Status>
                   </OrderEntry-Orders>
              </TBS2OHSReply>
         </SiebelMessage>
    </xsl:template>
    </xsl:stylesheet>

  • XSL transformation not working

    Hi!
    I am having problems when trying to generate XSL transformation from XML to XML (where XML output is actually XHTML). It always fails executing <xsl:callTemplate name="something", when <xsl:callTemplate /> is executed from another <xsl:template> which is also called with <xsl:callTemplate. Version of database is 10.2.0.4.0, received error is: ORA-00604: invalid character value 'burek' for attribute 'name'.
    Transformation is working in Java and Altova XMLSpy.
    PL/SQL code:
    procedure process_xsl(p_xml in clob, p_xsl in clob, p_result out clob) is
    w_xsl_proc dbms_XSLProcessor.Processor;
    w_xsl_ss dbms_XSLProcessor.Stylesheet;
    w_dom_xsl dbms_xmldom.DOMDocument;
    w_dom_xml dbms_xmldom.DOMDocument;
    w_parser dbms_xmlparser.Parser;
    begin
    --xml in xsl iz cloba v DOMDocument
    w_parser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(w_parser, p_xml);
    w_dom_xml := dbms_xmlparser.getDocument(w_parser);
    dbms_xmlparser.freeParser(w_parser);
    w_parser := dbms_xmlparser.newParser;
    dbms_xmlparser.parseClob(w_parser, p_xsl);
    w_dom_xsl := dbms_xmlparser.getDocument(w_parser);
    dbms_xmlparser.freeParser(w_parser);
    --xsl procesiranje
    w_xsl_proc := dbms_XSLProcessor.newProcessor;
    w_xsl_ss := dbms_XSLProcessor.newStylesheet(w_dom_xsl, null); <-- Here error is received
    END;
    Stylesheet:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"></xsl:output>
         <xsl:decimal-format name="dec" decimal-separator="," grouping-separator="."/>
         <!-- Predefined constants from einvoice xml schema -->
         <xsl:variable name="einvoiceIssuerCode" select="'II'"></xsl:variable>
         <xsl:variable name="einvoiceRecipientCode" select="'IV'"></xsl:variable>
         <xsl:variable name="einvoiceIssueLocationCode" select="91"></xsl:variable>
         <xsl:variable name="einvoiceIssueDateCode" select="137"></xsl:variable>
         <!-- Constants directly from document which is a part of transformation -->
         <xsl:variable name="einvoiceNumber" select="/IzdaniRacunEnostavni/Racun/GlavaRacuna/StevilkaRacuna/text()"></xsl:variable>
         <!-- Intro template -->
         *<xsl:template name="burek"> <!-- Second template called with xsl:call template -->*
              <xsl:text>TEST</xsl:text>
         </xsl:template>
         <!-- Template in which we create html structure including css -->
         <xsl:template name="einvoice">
              <html xmlns="http://www.w3.org/1999/xhtml">
              <head>
                   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
                   <title>Vizualizacija e-računa št. </title>
                   <xsl:call-template name="burek"></xsl:call-template>
              </head>
              <body>
              </body>
              </html>
         </xsl:template>
         <!-- Intro template -->
         <xsl:template match="/">
    *          <xsl:call-template name="einvoice"></xsl:call-template> <!-- This call is OK -->*
         </xsl:template>
    </xsl:stylesheet>
    XML document
    <?xml version="1.0" encoding="UTF-8"?>
    <IzdaniRacunEnostavni>
    <Racun Id="data">
    <GlavaRacuna>
    <VrstaRacuna>380</VrstaRacuna>
    <StevilkaRacuna>1205019908211</StevilkaRacuna>
    <FunkcijaRacuna>9</FunkcijaRacuna>
    </GlavaRacuna>
    <DatumiRacuna>
    <VrstaDatuma>137</VrstaDatuma>
    <DatumRacuna>2012-05-07T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-04-28T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-05-27T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-03-28T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-04-26T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <DatumiRacuna>
    <VrstaDatuma>263</VrstaDatuma>
    <DatumRacuna>2012-04-27T00:00:00.0Z</DatumRacuna>
    </DatumiRacuna>
    <Lokacije>
    <VrstaLokacije>91</VrstaLokacije>
    <NazivLokacije>Ljubljana</NazivLokacije>
    </Lokacije>
    </Racun>
    </IzdaniRacunEnostavni>
    Edited by: 938026 on 01-Jun-2012 00:35

    Hi,
    I think your problem lies in the <title>. You are using non UTF-8 characters in the title (š), but you marked your XML as UTF-8. So change the title to have unicode charaters and it will work.
    Herald ten Dam
    http://htendam.wordpress.com

  • XSL Transformation to Oracle Canonical Format

    XSL Transformation to Oracle Canonical Format
    Posted: Aug 6, 2007 9:31 AM Reply
    I am having issues with transforming XML into Oracle Canonical Format. Can someone, please tell me what am doing wrong?
    The source XML:
    <transform>
    <key old="driver" new="3" transform1="specified">
    <value old="-1" new="-1" description="NA" />
    <value old="0" new="0" description="no" />
    <value old="1" new="1" description="yes" />
    </key>
    </transform>
    I must transform it with XSL into Oracle Canonical format:
    <ROWSET>
    <ROW>
    <column_name_1 />
    <column_name_2 />
    <column_name_3 />
    </ROW>
    <ROW>
    <column_name_1 />
    <column_name_2 />
    <column_name_3 />
    </ROW>
    </ROWSET>
    So, I came up with this stylesheet.
    <?xml version="1.0"?><xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <ROWSET table = "table4xml">
    <ROW num ="1">
    <KEY_OLD>
    <xsl:value-of select="@old" />
    </KEY_OLD>
    <KEY_NEW>
    <xsl:value-of select="@new" />
    </KEY_NEW> <TRANSFORM1>
    <xsl:value-of select="@transform1" />
    </TRANSFORM1>
    <VALUEOLD>
    <xsl:value-of select="@valueold" />
    </VALUEOLD>
    <VALUENEW>
    <xsl:value-of select="@valuenew" />
    </VALUENEW>
    <DESCRIPTION>
    <xsl:value-of select="@description" />
    </DESCRIPTION>
    </ROW>
    </ROWSET>
    </xsl:template>
    </xsl:stylesheet>
    Table TABLE4XML
    KEY
    KEY_OLD
    KEY_NEW
    TRANSFORM1
    VALUEOLD
    VALUENEW
    DESCRIPTION
    I must have made a mistake within the XSL code, because the PL/SQL procedure that am using inserts a row of NULLs into the table.
    Am I correct that the given XML file should look in canonical format as this??
    <ROWSET>
    <ROW>
    <key>
    <old>driver</old>
    <new>3</new>
    <transform1>specified</transform1>
    <value>
    <old>-1</old>
    <new>-1</new>
    <description>NA</description>
    </value>
    </key>
    </ROW>
    </ROWSET>

    There is a misunderstanding in your question. Oracle canonical format has a root node named <rowset> and its children have the name of <row>. And its grandchildren have the name of <column>. This is all of canonical family, no other grand-grand-children :)
    Also here is an example for null values in canonical format. They are not presented in XML.
    SQL> set serveroutput on
    SQL> select null "col1", 'data' "col2" from dual;
    c col2
    data
    SQL> DECLARE
    2 ctx dbms_xmlgen.ctxHandle;
    3 xml CLOB;
    4 BEGIN
    5 ctx := dbms_xmlgen.newContext('select null "col1", ''data'' "col2" from dual');
    6 dbms_output.put_line(ctx);
    7
    8 xml := dbms_xmlgen.getXML(ctx);
    9 dbms_output.put_line(xml);
    10
    11 dbms_xmlgen.closeContext(ctx);
    12 END;
    13 /
    8
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <col2>data</col2>
    </ROW>
    </ROWSET>
    PL/SQL procedure successfully completed.
    Best Regards
    Erturk

  • XSL Transformation won't run in Web Start

    Hello,
    I am using the javax.xml.transform.Transformer implementation built into Java 1.5.x to transform an XML document into HTML using an XSLT transformation source. This code works perfectly if I run the app outside of Java Web Start. However, if I run the app in web start, the output is partial. More specifically, the XML and the XSLT load just fine in web start (I've confirmed this), but the end result of the Transformation is a properly formatted HTML document with only part of the data -- a bunch of data is missing.
    I have some loops in the XSLT that print out rows in an HTML table with the data I want to see. These loops don't seem to run when I'm in web start, but the rest of the transformation does run.
    I've confirmed this is not working on both Mac OS and Windows, version 1.5.0_06 and 1.5.0_09. So I don't think it is a bug on any particular platform. I am totally stumped by this. The XSL transformation process is doing something different in web start than it does when run from the command line (either different jars are in play, or system properties are different, etc).
    Has anyone else experienced this?
    Thank You,
    Eric

    One thing I'd like to mention...
    My XML document has no namespace defined, and neither does my XSLT transform document. I am just referencing plain old string element names that simply match between the XML and XSLT. This all works fine when the Transform is run from a java app that is started on the command line. Things break down when the app is run via Java Web Start. Could the namespace issue be the problem, however? I don't see how that could be as the code works from a 'normal' java app, but maybe I'm missing something.

  • XSL transformation in OSB

    Hi all,
    I am new to OSB. I am having trouble to understand how to do XSL transformation in OSB.
    I have created a business service which targets wsdl with a particular schema for the input message. I have created a separate wsdl for the proxy service with another schema the input message.
    I have to invoke the business service from proxy service. For this, I have added a route node and then a routing activity. In the request line of the routing activity i have used an assign where i will use XSLT to map input message of the proxy wsdl to the input message of the business service.
    How do we access other variables when creating an XSLT?
    Is my approach to the problem correct?
    John

    Hi,
    I am doing that in an replace action.
    In my flow I have the proxy service, then a pipeline, then I have the route.
    In the pipeline I have replaced the input request using a XQuery transformation. When I test it, I see the input is coming till the route.
    But the same pay load is valid and workin if I pass it when I invoke the route service independently. when i use it in the flow its not working.
    Simply it says the system error
    Below is the complete trace data
    (receiving request)
    Initial Message Context
    added $body
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <proj:alertReportDataRequestMessage xmlns:proj="http://www.projgis.org/PROJGISMessageSchema">
    <proj:header>
    <proj:RequestId>3333</proj:RequestId>
    <proj:ReqTransactionId>333</proj:ReqTransactionId>
    <proj:ConsumerId>string</proj:ConsumerId>
    <proj:ReqTimestamp>2008-09-29T07:19:45</proj:ReqTimestamp>
    </proj:header>
    <proj:NameOfTenant>string</proj:NameOfTenant>
    <proj:AddressOfTenant>string</proj:AddressOfTenant>
    <proj:RentalAmount>string</proj:RentalAmount>
    <proj:StartDateOfRent>2014-09-19T04:48:33</proj:StartDateOfRent>
    <proj:EndDateOfRent>2006-08-19T22:57:14+05:30</proj:EndDateOfRent>
    <proj:SalesOfOrder>string</proj:SalesOfOrder>
    </proj:alertReportDataRequestMessage>
    </soapenv:Body>
    added $header
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    added $inbound
    <con:endpoint name="ProxyService$PROJGISProject$PROXYSERVICE$GetRentalExpiryAlertsData" xmlns:con="http://www.bea.com/wli/sb/context">
    <con:service>
    <con:operation>insertClientReport</con:operation>
    </con:service>
    <con:transport>
    <con:uri>
    /PROJGISProject/PROXYSERVICE/GetRentalExpiryAlertsData
    </con:uri>
    <con:mode>request-response</con:mode>
    <con:qualityOfService>best-effort</con:qualityOfService>
    <con:request xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tran:headers xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
    <http:Content-Type>text/xml; charset=utf-8</http:Content-Type>
    <http:SOAPAction>
    "http://xmlns.bodhtree.com/GetRentalExpiryAlertsData/insertClientReport"
    </http:SOAPAction>
    </tran:headers>
    <tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8</tran:encoding>
    </con:request>
    <con:response xsi:type="http:HttpResponseMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tran:headers xsi:type="http:HttpResponseHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
    <http:Content-Type>text/xml</http:Content-Type>
    </tran:headers>
    <tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">0</tran:response-code>
    </con:response>
    </con:transport>
    <con:security>
    <con:transportClient>
    <con:username><anonymous></con:username>
    </con:transportClient>
    </con:security>
    </con:endpoint>
    added $messageID
    2570677769696620240-29ef401f.12cef26de6e.-7ef1
    PipelinePairNode1
    stage2
    Message Context Changes
    changed $body
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <ins:ClientReportCollection xmlns:ins="http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertClientReportTable">
    <ins:ClientReport>
    <ins:alertNo>1</ins:alertNo>
    <ins:tenentName>string</ins:tenentName>
    <ins:address>string</ins:address>
    <ins:rentalAmt>string</ins:rentalAmt>
    <ins:startDate>2014-09-19T04:48:33</ins:startDate>
    <ins:endDate>2006-08-19T22:57:14+05:30</ins:endDate>
    <ins:salesDocument>string</ins:salesDocument>
    <ins:transId>333</ins:transId>
    </ins:ClientReport>
    </ins:ClientReportCollection>
    </soapenv:Body>
    changed $inbound
    <con:endpoint name="ProxyService$PROJGISProject$PROXYSERVICE$GetRentalExpiryAlertsData" xmlns:con="http://www.bea.com/wli/sb/context">
    <con:service>
    <con:operation>insert</con:operation>
    </con:service>
    <con:transport>
    <con:uri>
    /PROJGISProject/PROXYSERVICE/GetRentalExpiryAlertsDataPush
    </con:uri>
    <con:mode>request</con:mode>
    <con:qualityOfService>best-effort</con:qualityOfService>
    <con:request xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tran:headers xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
    <http:Content-Type>text/xml; charset=utf-8</http:Content-Type>
    <http:SOAPAction>
    "http://xmlns.bodhtree.com/GetRentalExpiryAlertsData/insertClientReport"
    </http:SOAPAction>
    </tran:headers>
    <tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8</tran:encoding>
    </con:request>
    <con:response xsi:type="http:HttpResponseMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tran:headers xsi:type="http:HttpResponseHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
    <http:Content-Type>text/xml</http:Content-Type>
    </tran:headers>
    <tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">0</tran:response-code>
    </con:response>
    </con:transport>
    <con:security>
    <con:transportClient>
    <con:username><anonymous></con:username>
    </con:transportClient>
    </con:security>
    </con:endpoint>
    changed $header
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    RouteNode1
    Routed Service
    Route to: "GetRentalExpiryAlertsDataPush"
    $outbound:
    <con:endpoint name="ProxyService$PROJGISProject$PROXYSERVICE$GetRentalExpiryAlertsDataPush" xmlns:con="http://www.bea.com/wli/sb/context">
    <con:service>
    <con:operation>insertClientReport</con:operation>
    </con:service>
    <con:transport>
    <con:mode>request</con:mode>
    <con:qualityOfService>best-effort</con:qualityOfService>
    <con:request xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tran:headers xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
    <http:Content-Type>text/xml</http:Content-Type>
    </tran:headers>
    </con:request>
    </con:transport>
    <con:security>
    <con:doOutboundWss>false</con:doOutboundWss>
    </con:security>
    </con:endpoint>
    $body (request):
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <ins:ClientReportCollection xmlns:ins="http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertClientReportTable">
    <ins:ClientReport>
    <ins:alertNo>1</ins:alertNo>
    <ins:tenentName>string</ins:tenentName>
    <ins:address>string</ins:address>
    <ins:rentalAmt>string</ins:rentalAmt>
    <ins:startDate>2014-09-19T04:48:33</ins:startDate>
    <ins:endDate>2006-08-19T22:57:14+05:30</ins:endDate>
    <ins:salesDocument>string</ins:salesDocument>
    <ins:transId>333</ins:transId>
    </ins:ClientReport>
    </ins:ClientReportCollection>
    </soapenv:Body>
    $header (request):
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    $attachments (request):
    <con:attachments xmlns:con="http://www.bea.com/wli/sb/context"/>
    Message Context Changes
    added $outbound
    <con:endpoint name="ProxyService$PROJGISProject$PROXYSERVICE$GetRentalExpiryAlertsDataPush" xmlns:con="http://www.bea.com/wli/sb/context">
    <con:service>
    <con:operation>insertClientReport</con:operation>
    </con:service>
    <con:transport>
    <con:uri>
    /PROJGISProject/PROXYSERVICE/GetRentalExpiryAlertsDataPush
    </con:uri>
    <con:mode>request</con:mode>
    <con:qualityOfService>best-effort</con:qualityOfService>
    <con:request xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tran:headers xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
    <http:Content-Type>text/xml; charset=utf-8</http:Content-Type>
    </tran:headers>
    <tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8</tran:encoding>
    </con:request>
    <con:response xsi:type="http:HttpResponseMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tran:headers xsi:type="http:HttpResponseHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
    <http:Content-Type>text/xml</http:Content-Type>
    </tran:headers>
    <tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">1</tran:response-code>
    </con:response>
    </con:transport>
    <con:security>
    <con:doOutboundWss>false</con:doOutboundWss>
    </con:security>
    </con:endpoint>
    changed $body
    <soapenv:Body xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
    <ins:ClientReportCollection xmlns:ins="http://xmlns.oracle.com/pcbpel/adapter/db/top/InsertClientReportTable">
    <ins:ClientReport>
    <ins:alertNo>1</ins:alertNo>
    <ins:tenentName>string</ins:tenentName>
    <ins:address>string</ins:address>
    <ins:rentalAmt>string</ins:rentalAmt>
    <ins:startDate>2014-09-19T04:48:33</ins:startDate>
    <ins:endDate>2006-08-19T22:57:14+05:30</ins:endDate>
    <ins:salesDocument>string</ins:salesDocument>
    <ins:transId>333</ins:transId>
    </ins:ClientReport>
    </ins:ClientReportCollection>
    </soapenv:Body>
    changed $inbound
    <con:endpoint name="ProxyService$PROJGISProject$PROXYSERVICE$GetRentalExpiryAlertsData" xmlns:con="http://www.bea.com/wli/sb/context">
    <con:service>
    <con:operation>insert</con:operation>
    </con:service>
    <con:transport>
    <con:uri>
    /PROJGISProject/PROXYSERVICE/GetRentalExpiryAlertsDataPush
    </con:uri>
    <con:mode>request</con:mode>
    <con:qualityOfService>best-effort</con:qualityOfService>
    <con:request xsi:type="http:HttpRequestMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tran:headers xsi:type="http:HttpRequestHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
    <http:Content-Type>text/xml; charset=utf-8</http:Content-Type>
    <http:SOAPAction>
    "http://xmlns.bodhtree.com/GetRentalExpiryAlertsData/insertClientReport"
    </http:SOAPAction>
    </tran:headers>
    <tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">utf-8</tran:encoding>
    </con:request>
    <con:response xsi:type="http:HttpResponseMetaData" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <tran:headers xsi:type="http:HttpResponseHeaders" xmlns:tran="http://www.bea.com/wli/sb/transports">
    <http:Content-Type>text/xml</http:Content-Type>
    </tran:headers>
    <tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">0</tran:response-code>
    </con:response>
    </con:transport>
    <con:security>
    <con:transportClient>
    <con:username><anonymous></con:username>
    </con:transportClient>
    </con:security>
    </con:endpoint>
    changed $header
    <soap:Header xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    </soap:Header>
    Service Error Handler
    $fault: <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-380000</con:errorCode>
    <con:location>
    <con:node>RouteNode1</con:node>
    <con:path>response-pipeline</con:path>
    </con:location>
    </con:fault>
    System Error Handler
    $fault: <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
    <con:errorCode>BEA-380000</con:errorCode>
    <con:location>
    <con:node>RouteNode1</con:node>
    <con:path>response-pipeline</con:path>
    </con:location>
    </con:fault>
    Is there any place where I can refer how to work with passing data from current flow to the next flow.
    Do i need to do the transformation before invoking the route, or inside the route service request pipeline?
    Do I need to change the method, URI etc as wells? before invoking the routing?
    --Khaleel                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Javax.xml.transform.TransformerException durin XSL Transformation in Java

    Hi,
    Below is my piece of code where i access a web service that returns a xml as a string. I apply a xsl tranformation on it and try to store the result as a string. I get this error message
    javax.xml.transform.TransformerException: Result object passed to ''{0}'' is invalid.
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.getOutputHandler(Unknown Source)
         at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(Unknown Source)
         at NewService.main(NewService.java:52)My Code:
    import java.io.BufferedWriter;
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.StringReader;
    import java.net.MalformedURLException;
    import java.net.URL;
    import java.rmi.RemoteException;
    import javax.xml.namespace.QName;
    import javax.xml.rpc.ServiceException;
    import javax.xml.transform.Result;
    import javax.xml.transform.Source;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerConfigurationException;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.stream.StreamResult;
    import javax.xml.transform.stream.StreamSource;
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    public class NewService {
          * @param args
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              String endPoint = "http://localhost:8080/SampleDynamicWebProj/services/SampleClient";
              Service service = new Service();
              Call callOne;
              try {
                   callOne = (Call) service.createCall();
                   callOne.setTargetEndpointAddress(new URL(endPoint));
                   callOne.setOperationName(new QName("http://DefaultNamespace",
                             "getXMLString"));
                   String concated = (String) callOne.invoke(new Object[] { "s" });
                   InputStream xsltFile = new FileInputStream("xslpackage/empTran.xsl");
                   Source xmlSource = new StreamSource(new StringReader(concated));
                 Source xsltSource = new StreamSource(xsltFile);
                 TransformerFactory transFact =
                    TransformerFactory.newInstance();
                 Transformer trans = transFact.newTransformer(xsltSource);
                 Result result = new StreamResult();
                 trans.transform(xmlSource, result);
                 System.out.println(result.toString());
              } catch (ServiceException e) {
                   e.printStackTrace();
              } catch (MalformedURLException e) {
                   e.printStackTrace();
              } catch (RemoteException e) {
                   e.printStackTrace();
              } catch (FileNotFoundException e) {
                   e.printStackTrace();
              } catch (TransformerConfigurationException e) {
                   e.printStackTrace();
              } catch (TransformerException e) {
                   e.printStackTrace();
    }I get the transformed XML into a Result object, but when i do a toString() oon it, i get the above exception.
    any help wil be appreciated,
    Dilip

    Oh well, yes it was a typo in address tag...ok agreed that its a bad example, check this out then,
    i have a XML data that i convert to a html format using xsl transformation, now this converted html has to be shown in a html page(i use the out.write option).
    so my initial xml looks like this ::
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <Results>
        <ColumnCount>6</ColumnCount>
        <Columns>
            <column>UID</column>
            <column>UserName</column>
            <column>Password</column>
            <column>LastName</column>
            <column>FirstName</column>
            <column>EmailAddress</column>
        </Columns>
        <Rows>
            <Row>
                <value>1</value>
                <value>userone</value>
                <value>password-1</value>
                <value>Anant</value>
                <value>Dilip</value>
                <value>[email protected]</value>
            </Row>
            <Row>
                <value>2</value>
                <value>usertwo</value>
                <value>password-2</value>
                <value>Palli</value>
                <value>Gilli</value>
                <value>[email protected]</value>
            </Row>
        </Rows>I apply XSL transformation on this to get a HTML which i will be writing into my output screen hoping that the user will see it in a tabular format!
    <[!CDATA["
    <?xml version="1.0" encoding="UTF-8"?>
    <table border="1">
    <tr bgcolor="#9acd32">
    <th align="left">UID</th>
    <th align="left">UserName</th>
    <th align="left">Password</th>
    <th align="left">LastName</th>
    <th align="left">FirstName</th>
    <th align="left">EmailAddress</th>
    </tr>
    <tr>
    <td>1</td>
    <td>userone</td>
    <td>password-1</td>
    <td>Anant</td>
    <td>Dilip</td>
    <td>[email protected]</td>
    </tr>
    <tr>
    <td>2</td>
    <td>usertwo</td>
    <td>password-2</td>
    <td>Palli</td>
    <td>Gilli</td>
    <td>[email protected]</td>
    </tr>
    </table>
    "]]>The entire data is passed to a XML parser . I want the transformed xml data (which will be inside a <status></status> tag to be untouched by this parser. As you see i have put the transformed xml in a CDATA tag, but this aint helping me...
    need urgent help,
    Dilip

  • Creating an XML From a Deep Structure  using XSL Transformation

    Hi ABAPers,
    I have a requirement to use XSL Transformations on an ABAP deep type structure.
    Currently i have an API that fills in this deep structure and by using CALL TRANSFORMATION ID.... i will get the BIG XML having having 100s of nodes . But actualy form the deep structure i need only some NODES (say 50)... So i tried writing an XSLT
    in the transaction STRANS.. but on using this TRANSFORMATION which i wrote i am getting an error messgae like INVALID XML...
    Am i going in right track or is there a good solution...
    My sample transformation is as below...
    <xsl:transform version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:strip-space elements="*"/>
    <xsl:template match="/">
    <xsl:value-of select="DATA/NODE_ELEMENTS/UUID_KEY/UUID"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/SEMANTICAL_NAME"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/STRUCT_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/USAGE_CAT"/>
    <xsl:value-of select="DATA/NODE_ELEMENTS/RESTRICTED_IND"/>
    <xsl:value-of select="VALUES/DATA/NODE_ID"/>.
    </xsl:template>
    </xsl:transform>
    Please help me in solving this issue....
    Thanks,
    Linda.

    Hi Linda,
        I am replying based on your sample code.
       Try the below following suggestions.
       here 'GRPHDR' is the node where I am selecting the data.
               IGRPHDR is the name of the reference.
    First calling the transformation in you program.
    TYPES: BEGIN OF tl_hdr,
               msgid(20)    TYPE c,
                 END OF tl_hdr.
    DATA : t_hdr           TYPE STANDARD TABLE OF tl_hdr.
      GET REFERENCE OF t_hdr INTO l_result_xml-value.
        l_result_xml-name = 'IGRPHDR'.
        APPEND l_result_xml TO t_result_xml.
       TRY.
            CALL TRANSFORMATION yfi_xml_read
            SOURCE XML it_xml_data
            RESULT (t_result_xml).
          CATCH cx_root INTO l_rif_ex.
            l_var_text = l_rif_ex->get_text( ).
            l_bapiret-type = 'E'.
            l_bapiret-message = l_var_text.
            APPEND l_bapiret TO errormsgs.
            EXIT.
        ENDTRY.
    in XSL transformation
       First write a block of statement to specify from which node you are taking the data.
       No matter it is a node or sub-node.
    <xsl:transform xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output encoding="iso-8859-1" indent="yes" method="xml" version="1.0"/>
      <xsl:strip-space elements="*"/>
    <xsl:template match="/">
          <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <IGRPHDR>  " reference name of internal table
              <xsl:apply-templates select="//GrpHdr"/>
            </IGRPHDR>
      </asx:values>
        </asx:abap>
    </xsl:template>
    Next select the data from the nodes under the nodes specified in the transformation.
    here msgid is the field i am selecting for value.
    <xsl:template match="GrpHdr">
        <item>
          <MSGID>  " field in the internal table t_hdr where data has to go
            <xsl:value-of select="MsgId"/>
          </MSGID>
        </item>
      </xsl:template>
    reply back if further clarification is needed.
    Thanks and regards,
    Kannan N

  • Row to Column XSL Transform in BLS

    I have 11.5, sr3.
    I was going to use the XSLTransformation action to swap rows and columns of a data set using /Illuminator/stylesheets/RowToColumnTransform.xsl. I cannot get anything but the following as an output:
    <?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2007-12-12T13:27:29" EndDate="2007-12-03T08:09:17" StartDate="2007-12-03T08:09:17" Version="11.5.3"><Rowset><Columns/><Row/></Rowset></Rowsets>
    There are no errors, I just don't get the result. The input data set is as follows:
    <?xml version="1.0" encoding="UTF-8"?><Rowsets DateCreated="2007-12-12T13:27:29" EndDate="2007-12-03T08:09:17" StartDate="2007-12-03T08:09:17" Version="11.5.3"><Rowset><Columns><Column Description="" MaxRange="1" MinRange="0" Name="User_ID" SQLDataType="1" SourceColumn="User_ID"/><Column Description="" MaxRange="1" MinRange="0" Name="User_Name" SQLDataType="1" SourceColumn="User_Name"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_Number" SQLDataType="4" SourceColumn="Sample_Number"/><Column Description="User Name" MaxRange="1" MinRange="0" Name="Login_By" SQLDataType="1" SourceColumn="Login_By"/><Column Description="Examination Type" MaxRange="1" MinRange="0" Name="Examination" SQLDataType="1" SourceColumn="Examination"/><Column Description="" MaxRange="1" MinRange="0" Name="Examination_Title" SQLDataType="1" SourceColumn="Examination_Title"/><Column Description="" MaxRange="1" MinRange="0" Name="Examination_Desc" SQLDataType="1" SourceColumn="Examination_Desc"/><Column Description="" MaxRange="1" MinRange="0" Name="Test_Number" SQLDataType="4" SourceColumn="Test_Number"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_Time" SQLDataType="93" SourceColumn="Sample_Time"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_Status" SQLDataType="1" SourceColumn="Sample_Status"/><Column Description="" MaxRange="1" MinRange="0" Name="Authorize" SQLDataType="1" SourceColumn="Authorize"/><Column Description="" MaxRange="1" MinRange="0" Name="Total_Defects" SQLDataType="4" SourceColumn="Total_Defects"/><Column Description="" MaxRange="1" MinRange="0" Name="Carton_Code_Date" SQLDataType="1" SourceColumn="Carton_Code_Date"/><Column Description="" MaxRange="1" MinRange="0" Name="Package_Code_Date" SQLDataType="1" SourceColumn="Package_Code_Date"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_1_Container" SQLDataType="1" SourceColumn="Sample_1_Container"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_2_Container" SQLDataType="1" SourceColumn="Sample_2_Container"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_1_Container_Get" SQLDataType="1" SourceColumn="Sample_1_Container_Get"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_2_Container_Get" SQLDataType="1" SourceColumn="Sample_2_Container_Get"/><Column Description="" MaxRange="1" MinRange="0" Name="Machine_Scanned" SQLDataType="1" SourceColumn="Machine_Scanned"/><Column Description="" MaxRange="1" MinRange="0" Name="Machine_Shift_Flag" SQLDataType="4" SourceColumn="Machine_Shift_Flag"/><Column Description="" MaxRange="1" MinRange="0" Name="Maker_Name" SQLDataType="1" SourceColumn="Maker_Name"/><Column Description="" MaxRange="1" MinRange="0" Name="Packer_Name" SQLDataType="1" SourceColumn="Packer_Name"/><Column Description="" MaxRange="1" MinRange="0" Name="Sample_Size" SQLDataType="4" SourceColumn="Sample_Size"/><Column Description="SAP Product Code of the associated Cigarette Audit if Linked" MaxRange="1" MinRange="0" Name="Associated_Cig_Audit_SAP_Code" SQLDataType="1" SourceColumn="Associated_Cig_Audit_SAP_Code"/><Column Description="SAP Product Code of the associated Pack Audit if Linked" MaxRange="1" MinRange="0" Name="Associated_Pack_Audit_SAP_Code" SQLDataType="1" SourceColumn="Associated_Pack_Audit_SAP_Code"/><Column Description="Sample Number of the associated CIg Audit if Linked" MaxRange="1" MinRange="0" Name="Associated_Cig_Audit_Sample_Number" SQLDataType="1" SourceColumn="Associated_Cig_Audit_Sample_Number"/><Column Description="Sample Number of the associated Pack Audit if Linked" MaxRange="1" MinRange="0" Name="Associated_Pack_Audit_Sample_Number" SQLDataType="1" SourceColumn="Associated_Pack_Audit_Sample_Number"/><Column Description="" MaxRange="1" MinRange="0" Name="Machine_SAP_Code" SQLDataType="1" SourceColumn="Machine_SAP_Code"/><Column Description="" MaxRange="1" MinRange="0" Name="Machine_SAP_Desc" SQLDataType="1" SourceColumn="Machine_SAP_Desc"/><Column Description="" MaxRange="1" MinRange="0" Name="Maker_SAP_Code" SQLDataType="1" SourceColumn="Maker_SAP_Code"/><Column Description="" MaxRange="1" MinRange="0" Name="Maker_SAP_Desc" SQLDataType="1" SourceColumn="Maker_SAP_Desc"/><Column Description="" MaxRange="1" MinRange="0" Name="Packer_SAP_Code" SQLDataType="1" SourceColumn="Packer_SAP_Code"/><Column Description="" MaxRange="1" MinRange="0" Name="Packer_SAP_Desc" SQLDataType="1" SourceColumn="Packer_SAP_Desc"/><Column Description="" MaxRange="1" MinRange="0" Name="Action" SQLDataType="1" SourceColumn="Action"/></Columns><Row><Sample_Number>46</Sample_Number><Examination>MKNG_PQC_PACK</Examination><Examination_Title>PQC Pack Audit</Examination_Title><Examination_Desc>Making &amp; Packing PQC Pack Audit Sample Template</Examination_Desc><User_ID>clmf90</User_ID><User_Name></User_Name><Login_By>SYSTEM</Login_By><Test_Number>63</Test_Number><Sample_Time>2007-12-12T13:46:52</Sample_Time><Sample_Status>Complete</Sample_Status><Authorize>No</Authorize><Total_Defects>1</Total_Defects><Carton_Code_Date>-</Carton_Code_Date><Package_Code_Date>7T28D205 11:30</Package_Code_Date><Sample_1_Container>01-01</Sample_1_Container><Sample_2_Container>-</Sample_2_Container><Sample_1_Container_Get>01-01</Sample_1_Container_Get><Sample_2_Container_Get>-</Sample_2_Container_Get><Machine_Scanned>U-MAKER-205</Machine_Scanned><Maker_Name>0205</Maker_Name><Machine_Shift_Flag>1</Machine_Shift_Flag><Packer_Name>0205</Packer_Name><Sample_Size>2</Sample_Size><Associated_Cig_Audit_SAP_Code>2001155</Associated_Cig_Audit_SAP_Code><Associated_Pack_Audit_SAP_Code>-</Associated_Pack_Audit_SAP_Code><Associated_Cig_Audit_Sample_Number>MKNG-PQC-CIG-20071128-0004</Associated_Cig_Audit_Sample_Number><Associated_Pack_Audit_Sample_Number>---</Associated_Pack_Audit_Sample_Number><Machine_SAP_Code></Machine_SAP_Code><Machine_SAP_Desc>MAVERICK LT MENT 100</Machine_SAP_Desc><Maker_SAP_Code>2001155</Maker_SAP_Code><Maker_SAP_Desc>MAVERICK LT MENT 100</Maker_SAP_Desc><Packer_SAP_Desc>MAVERICK LT MENT 100</Packer_SAP_Desc><Packer_SAP_Code></Packer_SAP_Code></Row></Rowset></Rowsets>
    What am I missing?

    Sparks,
    Any reason you are not using the VerticalGrid Applet?
    Did you specify any of the parameters required by the XSL, such as ColumnID and ValueID?
    The XSL appears to only translate a single row node to a column....
    Try using this XSL:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:java="http://xml.apache.org/xslt/java" xmlns:xalan="http://xml.apache.org/xalan" exclude-result-prefixes="xalan java">
         <xsl:output encoding="UTF-8" method="xml" media-type="text/xml"/>
         <xsl:template match="/">
              <Rowsets DateCreated="{Rowsets/@DateCreated}" Version="{Rowsets/@Version}" StartDate="{Rowsets/@StartDate}" EndDate="{Rowsets/@EndDate}">
                   <xsl:for-each select="Rowsets">
                        <xsl:copy-of select="FatalError"/>
                        <xsl:copy-of select="Messages"/>
                        <xsl:copy-of select="HyperLinks"/>
                        <xsl:if test="count(/Rowsets/FatalError) = '0'">
                             <Rowset>
                                  <Columns>
                                       <Column Name="Name" SourceColumn="Name" Description="Name" SQLDataType="1" MinRange="0.0" MaxRange="1.0"/>
                                       <Column Name="Value" SourceColumn="Value" Description="Value" SQLDataType="1" MinRange="0.0" MaxRange="1.0"/>
                                  </Columns>
                                  <xsl:for-each select="/Rowsets/Rowset/Row/*[name()]">
                                       <Row>
                                            <xsl:element name="Name">
                                                 <xsl:value-of select="name(.)"/>
                                            </xsl:element>
                                            <xsl:element name="Value">
                                                 <xsl:value-of select="."/>
                                            </xsl:element>
                                       </Row>
                                  </xsl:for-each>
                             </Rowset>
                        </xsl:if>
                   </xsl:for-each>
              </Rowsets>
         </xsl:template>
    </xsl:stylesheet>
    Sam

  • Problems with xsl transformation

    Hi,
    I have an XSL to transform an XML to HTML code.
    I want my HTML to be ACCESSIBLE.
    All is working ok, but the <html> tag have two or three attributtes that make de code no ACCESSIBLE.
    This is a part of the XSL code:
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes">
         <xsl:output method="xhtml" version="1.0" encoding="UTF-8" indent="yes" standalone="no"/>
    <xsl:include href="barraSuperior.xsl"/>
         <xsl:include href="cabecera.xsl"/>
         <xsl:include href="menu.xsl"/>
         <xsl:include href="enllacosDestacats.xsl"/>
         <xsl:include href="contenido.xsl"/>
         <xsl:include href="barraBanners.xsl"/>
         <xsl:include href="pie.xsl"/>
         <xsl:variable name="homeWeb">http://172.16.67.119:8080/Biblioteques/xslt/V53CapSetmana</xsl:variable>
         <xsl:variable name="idioma"><xsl:value-of select="xmlData/config/idioma"/></xsl:variable>
         <xsl:variable name="literals" select="document(concat($homeWeb,'/traduccions/',$idioma,'.xml'))"/>
         <xsl:template match="/">
              <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{$idioma}" lang="{$idioma}">
                   <head>
                        <title>
    <body>
                        <xsl:call-template name="barraSuperior"/>
                        <xsl:call-template name="cabecera"/>
                        <div id="wrapper">                         
                             <div id="columna0">
                                  <xsl:apply-templates select="xmlData/menuLateral/contingutVignette/contingut/llista"/>
                             </div>     
                             <xsl:call-template name="contenido"/>
                        </div>
                        <xsl:call-template name="pie"/>
                   </body>
              </html>
         </xsl:template>
    </xsl:stylesheet>
    This is a part of the HTML result:
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <html xmlns="http://www.w3.org/1999/xhtml" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="ca" lang="ca">
         <head>
              <title>B cap de setmana</title>
    </head>
    <body>
    </body>
    I want the <html> to be like this:
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ca" lang="ca">

    Use the exclude-result-prefixes attribute in your xsl:stylesheet element.

  • Xsl transformation from html to text.

    Hi, i want to tranform an html source and produce a output as text. All i want to do is to output values from my input fields in my html source. Any ideas on how i would construct my xsl file.
    example :
    HTML:
    <html>
    <body>
    <input name="od" type="text" value="123">
    <input name="id" type="text" value="456">
    </body>
    </html>
    would simply give :
    123
    456
    Thanks for your help !!!

    Here is what I came up with. I changed the regular HTML into XHTML then created a stylesheet that would use XPath to find and display the values or the value fields:
    test.xml (XHTML version of the HTML you posted)
    ======================================
    <?xml version="1.0" encoding="UTF-8"?>
    <?xml-stylesheet type="text/xsl" href="test.xsl"?>
    <html>
    <body>
    <input name="od" type="text" value="123"/>
    <input name="id" type="text" value="456"/>
    </body>
    </html>
    test.xsl
    ======
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <html>
    <head>
    <title>Input values</title>
    </head>
    <body>
    <xsl:for-each select="html/body/input">
    <xsl:value-of select="@value"/>
    </xsl:for-each>
    </body>
    </html>
    </xsl:template>
    </xsl:stylesheet>
    this gives the desired result.

Maybe you are looking for

  • Setting up a PIX-PIX VPN with Dynamic and Static IP's

    Hey everyone.. I'm recently working to deploy two PIx-506E devices at a remote site and at my home. I want to be able to connect these together and eventually create a spoke and hub method of deployment to keep several of the places I manage separate

  • ITunes 7.5 won't let me play purchased music/TV shows

    I am running Leopard 10.5.1. When I try to play purchased music or television shows the window for Authorizing in to iTunes pops up. So I put my password in, but another window pops up that says "There was an error storing your authorization informat

  • Help needed with transactions and cmp

    Hi, if I have a class/ejb (no transaction) calling an ejb that has "transaction required" then a new transactions is started, how long is this transaction active? If my class/ejb (no transaction) calls another bean that has "transaction supported" wi

  • My iPad isn't activating my iMessage

    When trying to login to my iMessage, I keep getting an error message stating that it can't be activated at this time...try again. I've tried this several times.  Anyone else have this issue?

  • Server stuck at startup

    I set up a new Xserver at a school the other week. It ran great until yesterday when a user informed me that she couldn't access it. I wasn't able to log into it via ARD or Server tools... other than to see it on Server Monitor (everything looked fin