LrXML xsl transform cannot match document node on windows

On windows the xsl library used has a bug which is preventing it from matching the document node (the parent of the root element of the document).
I reduced this to a test case:
xml data:
<first>
  <second />
</first>
xsl stylesheet:
<xsl:stylesheet version='1.0' xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method='text'/>
  <xsl:template match='/'>ROOT<xsl:apply-templates/></xsl:template>
  <xsl:template match='first'>FIRST<xsl:apply-templates/></xsl:template>
  <xsl:template match='second'>SECOND<xsl:apply-templates/></xsl:template>
</xsl:stylesheet>
The output should be ROOTFIRSTSECOND and this is the observed output if this stylesheet is processed by msxsl or xsltproc. The problem is, when this is processed by LrXML on windows the output is FIRSTSECOND.
Granted I am not an xsl expert but to the best of my knowledge this looks like a bug. Any chance this can be fixed?
Cheers.

I used process explorer and found that in my case Lightroom uses msxml3.dll. I also ran msxml.exe -u 3.0 which selects the same dll for processing and verified that msxml.exe gives different results that Lightroom.
Here's the code I am running. In Info.lua:
  LrExportMenuItems = {
      title = 'Test XSLT',
      file = 'TestXSLT.lua'
and in TestXSLT.lua:
local logger = import('LrLogger')()
logger:enable('logfile')
local LrXml = import('LrXml')
local utils = require('utils')
local xml_data = [[
<?xml version='1.0' encoding='UTF-8'?>
<first>
  <second />
</first>
local xslt_data = [[
<xsl:stylesheet version='1.0' xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
  <xsl:output method='text'/>
  <xsl:template match='/'>ROOT<xsl:apply-templates/></xsl:template>
  <xsl:template match='first'>FIRST<xsl:apply-templates/></xsl:template>
  <xsl:template match='second'>SECOND<xsl:apply-templates/></xsl:template>
</xsl:stylesheet>
logger:debug('Parsing xml: ' .. xml_data)
local xml = LrXml.parseXml(xml_data)
logger:debug('Applying xslt: ' .. xslt_data)
local res = xml:transform(xslt_data)
logger:debug('Result: ' .. res)
Can you please try and verify that it is broken for you as well?
Thank you.
Fixed code formatting. disht

Similar Messages

  • XML Forms - Cannot append a text to a document node.

    Hi,
    I just created a new xml form as a copy of another working    form.
    I changed a bit in it and tried to run both i preview an real. Edit worked and renderlistitem worked. On the Show I got the error in the bottom.
    I tried to remove all the elements again, down to the displayname. But still I get the same error.
    I'm on NW04s SP9
    XML - Forms 
    Error applying XSL stylesheet to XML
    com.sapportals.wcm.WcmException: com.sap.engine.lib.xml.util.NestedException: org.w3c.dom.DOMException: Cannot append a text to a document node. -> org.w3c.dom.DOMException: Cannot append a text to a document node.
         at com.sapportals.wcm.service.pipeline.Pipeline.handle(Pipeline.java:284)
         at com.sapportals.wcm.service.pipeline.XSLTPipeline.handle(XSLTPipeline.java:118)
         at com.sapportals.wcm.service.xmlforms.transformation.Transformer.pipeIt(Transformer.java:133)
         at com.sapportals.wcm.service.xmlforms.transformation.Transformer.transform(Transformer.java:105)
         at com.sapportals.wcm.service.xmlforms.transformation.Transformer.transform(Transformer.java:77)
         at com.sapportals.wcm.service.xmlforms.transformation.HtmlGenerator.getHtmlStream(HtmlGenerator.java:122)
         at com.sapportals.wcm.service.xmlforms.transformation.Transformation.render(Transformation.java:391)
         at com.sapportals.wcm.service.xmlforms.transformation.Transformation.render(Transformation.java:222)
         at com.sapportals.wcm.app.xmlforms.PreviewServlet.sendForm(PreviewServlet.java:165)
         at com.sapportals.wcm.app.xmlforms.PreviewServlet.doGetAction(PreviewServlet.java:130)
         at com.sapportals.wcm.app.xmlforms.XFBaseServlet.doGet(XFBaseServlet.java:241)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sapportals.wcm.app.xmlforms.XFBaseServlet.service(XFBaseServlet.java:134)
         at com.sapportals.wcm.portal.proxy.PCProxyServlet.service(PCProxyServlet.java:331)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sapportals.portal.prt.core.broker.ServletComponentItem$ServletWrapperComponent.doContent(ServletComponentItem.java:110)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.serviceDeprecated(AbstractPortalComponent.java:209)
         at com.sapportals.portal.prt.component.AbstractPortalComponent.service(AbstractPortalComponent.java:114)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.component.PortalComponentResponse.include(PortalComponentResponse.java:215)
         at com.sapportals.portal.prt.pom.PortalNode.service(PortalNode.java:646)
         at com.sapportals.portal.prt.core.PortalRequestManager.callPortalComponent(PortalRequestManager.java:328)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:136)
         at com.sapportals.portal.prt.core.PortalRequestManager.dispatchRequest(PortalRequestManager.java:189)
         at com.sapportals.portal.prt.core.PortalRequestManager.runRequestCycle(PortalRequestManager.java:753)
         at com.sapportals.portal.prt.connection.ServletConnection.handleRequest(ServletConnection.java:240)
         at com.sapportals.portal.prt.dispatcher.Dispatcher$doService.run(Dispatcher.java:522)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sapportals.portal.prt.dispatcher.Dispatcher.service(Dispatcher.java:405)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.servlet.InvokerServlet.service(InvokerServlet.java:156)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)
         at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

    Hi Rasmus,
    Quite probable your XSL is broken.
    > tried to remove all the elements again
    So two possibilities:
    (a) You tried to - but failed
    (b) You are the victim of a cache
    Wait for at most 30 minutes and/or recheck your changes.
    Hope it helps
    Detlev

  • "XSL Error: Cannot use a DTMLiaison for a input DOM node"

    This code:
    Writer writer = new StringWriter();
    XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
    // Note: event.getDocument() returns a
    // org.apache.xerces.dom.DocumentImpl
    // sourced from xlms.jar
    processor.process(new XSLTInputSource(event.getDocument()),
    new XSLTInputSource(new FileReader(GDS_XSLT_STYLESHEET)),
    new XSLTResultTarget(writer));
    Gives this stacktrace:
    XSL Error: Cannot use a DTMLiaison for a input DOM node... pass a weblogic.apache.xalan.xpath.xdom.XercesLiaison
    instead!
    XSL Error: SAX Exception
    weblogic.apache.xalan.xslt.XSLProcessorException:
         at weblogic.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1756)
         at weblogic.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1648)
         at weblogic.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl.java:876)
         at weblogic.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:600)
    1. All XML/XSLT classes are being sourced from weblogic.jar or xmlx.jar
    2. Both jar files come from the WLS installation (WLS6.0 + SP2)
    3. There are no other XML class providers on my class path
    4. This is a standalone application, not running within WLS; I'm using weblogic
    jarfiles here purely so I use the same XML implementation both inside and outside
    WLS. Is this a sensible approach?
    Any help, anyone?

    All works fine in WLS6.1, with this extra code:
    System.setProperty("javax.xml.transform.TransformerFactory",
    "weblogic.apache.xalan.processor.TransformerFactoryImpl");
    (or you could use -D)
    No longer concerned; we've moved off WLS6.0
    "Simon Spruzen" <[email protected]> wrote:
    >
    Interestingly, expanding the code to (the very verbose):
    Document sourceDocument = event.getDocument();
    XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
    StringWriter source = new StringWriter();
    XMLSerializer sourceSerializer = new XMLSerializer(source, new OutputFormat(sourceDocument));
    sourceSerializer.asDOMSerializer();
    sourceSerializer.serialize(sourceDocument.getDocumentElement());
    StringWriter output = new StringWriter();
    processor.process(new XSLTInputSource(source.toString()),
    new XSLTInputSource(new FileReader(GDS_XSLT_STYLESHEET)),
    new XSLTResultTarget(output));
    (i.e. document -> string -> transform -> string)
    works just fine, but this code is far too long-winded for me to be happy
    with.
    (Note that one of XSLTInputSource's ctors does take a Node, so I'm assuming
    that
    it should be perfectly safe to pass a Document here)
    (Note also, that for various reasons at the moment, using JAXP's transformer
    factory
    is difficult for us)
    "Simon Spruzen" <[email protected]> wrote:
    This code:
    Writer writer = new StringWriter();
    XSLTProcessor processor = XSLTProcessorFactory.getProcessor();
    // Note: event.getDocument() returns a
    // org.apache.xerces.dom.DocumentImpl
    // sourced from xlms.jar
    processor.process(new XSLTInputSource(event.getDocument()),
    new XSLTInputSource(new FileReader(GDS_XSLT_STYLESHEET)),
    new XSLTResultTarget(writer));
    Gives this stacktrace:
    XSL Error: Cannot use a DTMLiaison for a input DOM node... pass a weblogic.apache.xalan.xpath.xdom.XercesLiaison
    instead!
    XSL Error: SAX Exception
    weblogic.apache.xalan.xslt.XSLProcessorException:
         at weblogic.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1756)
         at weblogic.apache.xalan.xslt.XSLTEngineImpl.error(XSLTEngineImpl.java:1648)
         at weblogic.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl.java:876)
         at weblogic.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:600)
    1. All XML/XSLT classes are being sourced from weblogic.jar or xmlx.jar
    2. Both jar files come from the WLS installation (WLS6.0 + SP2)
    3. There are no other XML class providers on my class path
    4. This is a standalone application, not running within WLS; I'm using
    weblogic
    jarfiles here purely so I use the same XML implementation both inside
    and outside
    WLS. Is this a sensible approach?
    Any help, anyone?

  • Matching namespace qualified xpaths vis JAXP xsl transforms

    I am having problems getting template
    matches to work when matching against
    namespace qualified tags. I am passing
    the source xml and xsl into a JAXP transformer.
    The xsl templates sucessfully match against non namespace
    qualified tags but not namespace qualified tags.
    I have set the DocumentBuilderFactory to be namespace aware. The xml source and the xsl source are loaded
    from the file system i.e. the DOM's are not
    built programmatically.
    Peter.

  • Is there a way to modify the style sheet so that it transforms an XML document with empty tags as tag / ?

    I have extracted some code from codeproject to
    reindent an XML document. Does anyone know how I can modify the stylesheet to make it so that the transform of an XML file will result in empty tags showing up as <tag /> instead of <tag></tag>?
    // http://www.codeproject.com/Articles/43309/How-to-create-a-simple-XML-file-using-MSXML-in-C
    MSXML2::IXMLDOMDocumentPtr FormatDOMDocument(MSXML2::IXMLDOMDocumentPtr pDoc)
    LPCSTR const static szStyleSheet =
    R"!(<?xml version="1.0" encoding="utf-8"?>)!"
    R"!(<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">)!"
    R"!( <xsl:output method="xml" indent="yes"/>)!"
    R"!( <xsl:template match="@* | node()">)!"
    R"!( <xsl:copy>)!"
    R"!( <xsl:apply-templates select="@* | node()"/>)!"
    R"!( </xsl:copy>)!"
    R"!( </xsl:template>)!"
    R"!(</xsl:stylesheet>)!";
    MSXML2::IXMLDOMDocumentPtr pXmlStyleSheet;
    pXmlStyleSheet.CreateInstance(__uuidof(MSXML2::DOMDocument60));
    pXmlStyleSheet->loadXML(szStyleSheet);
    MSXML2::IXMLDOMDocumentPtr pXmlFormattedDoc;
    pXmlFormattedDoc.CreateInstance(__uuidof(MSXML2::DOMDocument60));
    CComPtr<IDispatch> pDispatch;
    HRESULT hr = pXmlFormattedDoc->QueryInterface(IID_IDispatch, (void**)&pDispatch);
    if (SUCCEEDED(hr))
    _variant_t vtOutObject;
    vtOutObject.vt = VT_DISPATCH;
    vtOutObject.pdispVal = pDispatch;
    vtOutObject.pdispVal->AddRef();
    hr = pDoc->transformNodeToObject(pXmlStyleSheet, vtOutObject);
    //By default it is writing the encoding = UTF-16. Let us change the encoding to UTF-8
    // <?xml version="1.0" encoding="UTF-8"?>
    MSXML2::IXMLDOMNodePtr pXMLFirstChild = pXmlFormattedDoc->GetfirstChild();
    // A map of the a attributes (vesrsion, encoding) values (1.0, UTF-8) pair
    MSXML2::IXMLDOMNamedNodeMapPtr pXMLAttributeMap = pXMLFirstChild->Getattributes();
    MSXML2::IXMLDOMNodePtr pXMLEncodNode = pXMLAttributeMap->getNamedItem(_T("encoding"));
    pXMLEncodNode->PutnodeValue(_T("UTF-8")); //encoding = UTF-8
    return pXmlFormattedDoc;
    Or, if there is some other method for reindenting a MSXML2::IXMLDOMDocumentPtr object where I can specify how I want empty tags to be stored, that would be great too.  However, I don't want it to lose its status of an MSXML2::IXMLDOMDocumentPtr object.
     I.e. I would like to still perform operations on the result as if it was still an MSXML2::IXMLDOMDocumentPtr object.
    Thanks,
    A
    Adrian

    If anyone is interested, I got an answer on StackOverflow
    here.
    Adrian

  • 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

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

  • XSL Transformation failure

    Here is a sample of my code:
    I initially have one (non-null & valid - checked that !) node (dataNode). I need to do a XSL transformation on this one using an xsl (non-null & valid String). I can do manually the transform using a program such as XMLSpy and everything's fine !!!
    If I pass the initial Node to transform as a String to the following function it works fine:
    * Return the transformation of an XML through an XSL
    public static String getTransformedXML(String xmlSourceString, String xslSourceString) {
    StreamSource xmlSource;
    StreamSource xslSource;
    StreamResult xmlDestination;
    StringWriter sw;
    try {
    xmlSource = new StreamSource(new StringReader(xmlSourceString));
    xslSource = new StreamSource(new StringReader(xslSourceString));
    xmlDestination = new StreamResult(sw = new StringWriter());
    Transformer thisTransformer = tFactory.newTransformer(xslSource);
    thisTransformer.transform(xmlSource, xmlDestination);
    System.out.println("xxxxx = " + sw.getBuffer());
    return sw.getBuffer().toString();
    } catch (TransformerConfigurationException e) {
    System.out.println("TRANSFORMATION CONFIGURATION ERROR:" + e.getMessage());
    return null;
    } catch (TransformerException e) {
    System.out.println("TRANSFORMATION ERROR:" + e.getMessage());
    return null;
    But I CANNOT get working this code (instead of giving a String, I give a Node):
    * Return the transformation of an XML through an XSL
    public static Node getTransformedXML(Node xmlSourceNode, String xslSourceString) {
    DOMSource xmlSource;
    StreamSource xslSource;
    DOMResult xmlDestination;
    try {
    xmlSource = new DOMSource(xmlSourceNode);
    xslSource = new StreamSource(new StringReader(xslSourceString));
    xmlDestination = new DOMResult();
    Transformer thisTransformer = tFactory.newTransformer(xslSource);
    System.out.println("avant");
    thisTransformer.transform(xmlSource, xmlDestination); // HERE IS WHERE IT CRASHES !!!!
    System.out.println("apres");
    return xmlDestination.getNode();
    } catch (TransformerConfigurationException e) {
    System.out.println("TRANSFORMATION CONFIGURATION ERROR:" + e.getMessage());
    return null;
    } catch (TransformerException e) {
    System.out.println("TRANSFORMATION ERROR:" + e.getMessage());
    return null;
    While using this function, I'm receiving the DOM Exception 3
    TRANSFORMATION ERROR:org.apache.crimson.tree.DomEx: HIERARCHY_REQUEST_ERR : This node is not allowed here !
    Also, does someone knows a way to convert a Node in a String ??? I'd like just to be able to println a node in the form "<parentNode><node1>value</node1><node2>value</node2></parentNode>" for example.
    Please help !!!!
    Thanks a lot in advance to any Java/XML Guru for helping.
    Eg\\*

    Come on ... I cannot believe that nobody saw that before. Isn't there any java/dom guru in here ;-) ?
    Could it be a possibly a bug in the API ?
    Thank you very much.
    Eg\\*

  • 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 Action Parameters

    Does anyone know how, or even if it's possible, to pass parameters to an XSLT stylesheet using the XSL Transformation action in a Business Logic Transaction?

    Som,
    The parameter I was referring to is not an action parameter, but a parameter in the XSLT itself. E.G. the following extracts a column from an xMII document and creates a new doc with that one column. But I want to name the column at run time, so I can use the same XSLT in various places.
    [code]
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:param name="ColumnToExtract" select="ProductAshDry"></xsl:param> <xsl:template match="/">
        <Rowsets DateCreated="2007-05-31T10:58:25" EndDate="2007-05-31T10:58:25" StartDate="2007-05-31T10:58:25" Version="11.5.2">
          <Rowset>
            <Columns>
              <Column Description="Item" MaxRange="0" MinRange="0" Name="Data" SQLDataType="1" SourceColumn="Data"/>
            </Columns>
            <xsl:for-each select="/Rowsets/Rowset/Row">
              <Row>
                <Data>
                  <xsl:value-of select="$ColumnToExtract"/>
                </Data>
              </Row>
            </xsl:for-each>
          </Rowset>
        </Rowsets>
      </xsl:template>
    </xsl:stylesheet>
    [/code]
    ColumnToExtract is a parameter for the XSLT, which can be set at runtime with various other transform engines. I just can't see a way to set it using the xMII XSL Transformation action.
    Regards,
    Bill

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

  • No validation of xsl transforms within process

    Hi there,
    I've posted this before with no avail.
    I have process which creates an XML schema from a file adpator.
    The input/output XML validation is turned on, on my BPEL server and is working well.
    I then transform this XML to another 'global schema' which is heavily validated with lots of <restricts>.
    More processing is done on this global schema, then finally it is converted over to a DB schema for output to a DB.
    As meationed above the schemas are validated on input and output (from file, to DB) fine. If i place a <restrict> on any values on these schemas the process fails.
    BUT, is the transformation the takes place within the process (from the file schema to the global schema) suppose to be validated?
    Using the XSLT mapping tool i am able to test the transformation and when i click validate quite rightly it fails. But when in the BPEL server this section does not fail, it just does the tranformation without validation.
    Is this just functionality?
    thanks,

    You want to tell whether the output of an XSL transformation will validate against a schema? I don't see what good looking at the XPath expressions in the XSLT would do -- it might not even have any, or they might be simple ones relative to the context node. And even if you did have any, I can't see how they are relevant to the output of the transformation. Which could be anything.
    And I don't see how you could find out anything about paths in the output document. I doubt you could even tell whether the output was well-formed XML let alone whether it conformed to a schema.
    So: I don't think there's an existing solution for that because (a) it isn't very simple and (b) it isn't a common requirement. Of course I could be wrong in my opinion that it isn't possible to do such a thing. But I don't think I'm wrong about it being extremely difficult.

  • 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

Maybe you are looking for

  • Exchange Rate problem in BW

    Hello Friends, The Currency Translation of all BW Web reports is ending with below error message. After opening report on Web, below things are not working and ending with same below error message. "System error in program CL_RSR_WWW_CTRL_DDOWN and f

  • How to check and delete the change logs for DSO

    Hello All, I have build a process chain that will delete the change logs for DSO prior to 7 days but when i executed it, the number of entries are still the same within DSO. Then i tried deleting directly from "Environment" menu from DSO maintainance

  • Time Machine stuck on 'Preparing to back-up'

    Hi Since upgrading to Lion my iMac has not completed a Time Machine back-up. It's constantly turning away, saying 'Preparing to back-up'. Any suggestions please? Cheers Phil

  • Selection All Option in OCR Application - OADP

    Hi All, I am working on the OADP interface for OCR Application. I need to understand, in the OADP interface, I need to give an option to select all which will select all the org unit and displays all the employees. Can anyone please guide me. Regards

  • Gnome 3 ignoring my locales

    Gnome 3 (or gdm) a) stopped reading my .xprofile which is annoying as hell b) started ignoring the time-format and other stuff I set through my locales. What a cunt. More annoyingly, thunderbird uses the right date format when started through a termi