XSL ?? value-of

hi all
i need to prepare a style sheet, where my xml document looks like this ..
<dir>
<person>
<name> xyz </name>
<age> 00 </age>
</person>
<person>
<occupation> idle </occupation>
<person>
</dir>
essentially, i need to output this file in a table format using xsl. however i see that xsl has value-of select clause, but where u shud know what is the tag name.
If i am not sure of the tag names as above, does xsl still help me to output this file as a table ..
i hope i am clear
tnx

hi,
sorry i am in my badass day - i apologize for my harsh answer.
here is your XSL: i use HTML output because it is more relevant for building tables, but you can replace this with | - or _ if you wish...
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
     <xsl:output method="html"/>
     <xsl:template match="dir">
          <xsl:apply-templates select="person"/>
     </xsl:template>
     <xsl:template match="person">
          <p>Person:
               <table border="1">
                    <xsl:apply-templates/>
               </table>
          </p>
     </xsl:template>
     <xsl:template match="person/*">
          <tr>
               <td>
                    <xsl:value-of select="local-name(.)"/>
               </td>
               <td>
                    <xsl:value-of select="."/>
               </td>
          </tr>
     </xsl:template>
</xsl:stylesheet>

Similar Messages

  • XML-22009: (Error) Attribute 'select' not found in 'xsl:value-of'

    Hello,
    I'm a long-time Siebel developer but novice to BIP, trying to enhance some complex rtf templates that an experienced xdo/bip developer (contractor) designed for us in the past, with a couple of new fields that have been added to the integration object.
    All templates and sub-templates receive 'no errors found' when using add-in tool selection of 'Validate Template'. Unfortunately we cannot utilize the 'preview' capability due to the way the sub-templates are called, so only way to test is to upload into server and attempt to run real-time.
    This results in UI error of SBL-OMS-00203, which when we dig into the xdo log file turns out to be:
    <Line 648, Column 88>: XML-22009: (Error) Attribute 'select' not found in 'xsl:value-of'.
    I have exported all templates and sub-templates into XSL-FO Style Sheet and looked at line 648 column 88, and none of them seem to correspond to this line/column combination (in fact most exports do not even go that high in lines).
    Googling 'XML-22009' hasn't proven to be of much help, so reaching out to the xdo experts in this forum.
    How are the line/column #'s determined in the xdo log output?
    I am pretty sure that it must be some issue with my 'Main' template, since none of the sub-templates have been changed (and the current version of the report, without the new fields incorporated, still runs fine from the UI). In the XSL-FO format export of the (modified, with new fields added) 'Main.rtf' file, line 648 places it right in the midst of a bunch of hex which corresponds to an imbedded image (which was also part of the existing template, no change there) and that line only has 65 columns (i.e. doesn't even go up to 88), so I'm questioning how valid the Line/Column information is in the xdo log error message.
    Any hints on troubleshooting this one would be greatly appreciated!
    Thanks & Regards,
    Katrina

    Hi,
    as I wrote in the inital message, we even left out the output method or used "application/pdf". The result is unfortunately always the same. And I still claim this is not a problem with the stylesheet itself, it has to do something with the mobile's environment.
    Something I didn't tell: we have 2 servlets in our application, 1 responsible for output in html and 1 in pdf. The .fo stylesheet passed to the 'html servlet' is parsed correctly (and shows the source code, because it does not know about fo and conversion to pdf), the .xsl stylesheet passed to the 'pdf servlet' raises same exception/same line. You might tell us that there is a problem with the 'pdf servlet', but once again: why in online it is working?
    Greetings and thanx very much for your precious time!

  • Xsl value in html a href="" tag

    Hi all,
    I am converting the xml data to html using xsl file.In this I need to give link (<a href=") in html from the value of xml element.
    I assigned the value to a variable in xsl as vId and I try to use it in the href attribute.
    example:
    </xsl:value-of>>hello!!
    But xsl is not allowing this action.
    How to assign the xsl variable value to href attribute?
    Help me to slove this problem.
    regards,
    Selva.

    hai,
    y dont u try writing this code where u require <a href="     <xsl:element name="a">
              <xsl:attribute name="href">
    <xsl:value-of select="$vId"/>
    </xsl:attribute>
         </xsl:element>
    by doing so u will generate the tag dynamically

  • Using dynamic select (xsl:value-of) in XSLT (ABAP)

    Hi folks,
    I did a quite extensive search in the archive but couldn't find an answer on my question. If it has been answered before please just provide me with the link :).
    I need to make a dynamic select in a xsl-value-of in an ABAP XSLT. I do not know the structure of the input message (can be of any kind) and I want to perform a xpath query on the input message. The result of the transformation should be the value (if any) of the xpath query. As the query is not known in before I want to pass the query at runtime using a parameter in XSLT. If I pass my query as a string parameter the value-of just returns the string and not the value of the xpath query. Creating the parameter as a node-set doesn't work either for me.
    So is there any way to use a parameter as input to an xpath query?
    Or is my last resort using a JAVA XSLT processor. This is running inside a ABAP proxy, so a call to JAVA would be a greater hassle.
    Kind regards
    Joscha

    What DB version?
    The following SQL
    select xmltransform(XMLTYPE('<song>
      <title>Isn''t she lovely?</title>
    </song>'), XMLTYPE('<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output method="xml" encoding="UTF-8"></xsl:output>
      <xsl:template match="//song">
        <out>
          <xsl:value-of select="title" disable-output-escaping="yes"></xsl:value-of>
        </out>
      </xsl:template>
    </xsl:stylesheet>'))
      from dual;produces this on 11.1.0.6
    <?xml version="1.0" encoding="UTF-8"?>
    <out>Isn't she lovely?</out>and this on 10.2.0.4
    <out>Isn&apos;t she lovely?</out>I found a couple of previous discussions regarding this at
    {thread:id=679397}
    {thread:id=879301}
    The last discussion provides a workaround if you need it.

  • XSLT : Problem using xsl:value-of disable-output-escaping="yes"

    Hello,
    I have some problem using "disable-output-escaping" attribute of xsl:value-of() function.
    I have a table SONGS with two columns XML and XSL filled with :
    <song>
      <title>Isn't she lovely?</title>
    </song>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output method="xml" encoding="UTF-8"></xsl:output>
      <xsl:template match="//song">
        <out>
          <xsl:value-of select="title" disable-output-escaping="yes"></xsl:value-of>
        </out>
      </xsl:template>
    </xsl:stylesheet>The query to transform XML with XSL :
    SELECT XMLTRANSFORM (xml, xsl)  FROM songs;I get this XML :
    <out>Isn&apos;t she lovely?</out>but I want that (without the '&amp;' special character) :
    <out>Isn't she lovely?</out>How can I procees to succeed ?
    Thanks,
    Dominique

    What DB version?
    The following SQL
    select xmltransform(XMLTYPE('<song>
      <title>Isn''t she lovely?</title>
    </song>'), XMLTYPE('<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:output method="xml" encoding="UTF-8"></xsl:output>
      <xsl:template match="//song">
        <out>
          <xsl:value-of select="title" disable-output-escaping="yes"></xsl:value-of>
        </out>
      </xsl:template>
    </xsl:stylesheet>'))
      from dual;produces this on 11.1.0.6
    <?xml version="1.0" encoding="UTF-8"?>
    <out>Isn't she lovely?</out>and this on 10.2.0.4
    <out>Isn&apos;t she lovely?</out>I found a couple of previous discussions regarding this at
    {thread:id=679397}
    {thread:id=879301}
    The last discussion provides a workaround if you need it.

  • Is xsl:value-of disable-output-escaping="yes"/ Supported in 2.0.2.6?

    I can't seem to display HTML from XML.
    In my XML file I store the HTML snippet in an XML tag:
    <PRE>
    <body.htmlcontent>
    <&#60;table width="540" border="0" cellpadding="0" cellspacing="0">
    &#60;tr>&#60;td>
    &#60;font face="Helvetica, Arial" size="2">
    &#60;!-- STILL IMAGE GOES HERE -->
    &#60;img src="graphics/imagegoeshere.jpg" width="200" height="175" align="right" vspace="0" hspace="7">
    &#60;!-- END STILL IMAGE TAG -->
    &#60;!-- CITY OR TOWN NAME GOES FIRST FOLLOWED BY TWO LETTER STATE ABBREVIATION -->
    &#60;b>City, state abbreviation&#60;/b> -
    &#60;!-- CITY OR TOWN NAME ENDS HERE -->
    &#60;!-- STORY TEXT STARTS HERE -->
    Story text goes here..
    &#60;!-- STORY TEXT ENDS HERE -->
    &#60;/font>
    &#60;/td>&#60;/tr>&#60;/table>
    </body.htmlcontent>
    </PRE>
    I use the following in my xsl:
    <xsl:value-of select="body.HTMLcontent" disable-output-escaping="yes"/>
    However, the HTML output <PRE>&#60;</PRE>is still outputted and all of the HTML tags
    are displayed in the browser. How do I display the HTML properly?
    Bob Hewett
    [email protected]

    This makes sense. Here's why.
    oraxsl internally uses the:
    void XSLProcessor.processXSL(style,source,printwriter);
    XSLSample.java uses:
    DocumentFragment XSLProcessor.processXSL(style,source);
    The former supports <xsl:output> and all
    options related to writing out output
    that might not be valid XML (including the disable output escaping)
    The latter is pure XML-to-XML tree returned,
    so no <xsl:output> or disabled escaping
    can be used since nothing's being output,
    just a DOM tree fragment of the result is
    being returned.
    null

  • Where is common xsl:-value of tasks in SPD 2013

    I am not able to find the option to convert the column to hyperlink in SPD2013. . I  have a content editor webpart which links to dataview webpart via hyperlink in SP 2010  on the same page w this does not work as i dont see the "common
    xsl:-value of tasks" option due to missing design view..Is there any workaround to convert the coulmn name to hyperlink in SPD2013?
    Amrita Talreja

    Hi,
    According to your post, my understanding is that you wanted to convert the column name to hyperlink.
    We can still use the SharePoint Designer to achieve it, you can change the column type on a column level.
    You can also use the xslt to achieve it. Here is a simple example for your reference.
    http://sharepoint.stackexchange.com/questions/41395/how-to-convert-column-field-into-hyperlink-with-xslt
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • To read xsl values of subsequent nodes in xml document

    Hi,
    I have a xml document which looks something like this
    <report>
    <prelist>
    <row>
    <field name="learning" value="Internet basics"/>
    </row>
    <row>
    <field name="learning" value="General Knowlege"/>
    </row>
    </prelist>
    <list>
    <row>
    <field name="learning" value="Internet basics"/>
    <field name="tool" value="xml"/>
    </row>
    <row>
    <field name="learning" value="Internet basics"/>
    <field name="tool" value="xmlxsl"/>
    </row>
    <row>
    <field name="learning" value="General Knowledge"/>
    <field name="tool" value="xmltool"/>
    </row>
    </list>
    </report>
    What i would like to do is
    I read the prelist structure and retrieve the value of "learning"
    For each value i retrieve i would like to read the list structure for similar values
    e .g in first iteration i get the value = "Internet Basics" from prelist node then from list node i would like tool node with value = "xml" and value="xmlxsl"
    Please let me know if this is possible and nay help would be appreciated..
    Thanks.

    I don't see how you go from the prelist to the list but I guess that doesn't matter.
    You can load the XML into a DOM document then use the Document method:
    getElementsByTagName
    public NodeList getElementsByTagName(String tagname)
    Returns a NodeList of all the Elements with a given tag name in the order in which they are encountered in a preorder traversal of the Document tree.
    Parameters:
    tagname - The name of the tag to match on. The special value "*" matches all tags. Returns:
    A new NodeList object containing all the matched Elements.

  • Getting unique values from a list using XSL

    I have a requirement to dynamically generate a unique list of categories that will be used to populate a drop-down box.
    The XML that is being sent is in a format similar to this...
    <item>
    <title>random text1</title>
    <category>research</category>
    <category>marketing</category>
    <category>industry</category>
    </item>
    <item>
    <title>random text2</title>
    <category>research</category>
    <category>development</category>
    </item>
    <item>
    <title>random text3</title>
    <category>marketing</category>
    <category>fishing</category>
    <category>hunting</category>
    <category>development</category>
    </item>
    What i need is to be able to generate a list of all the unique "category" items, without having any duplicates.... eg in the example above, the list would be "marketing, fishing, hunting, research, development, industry"
    I've been using the following xsl, which works, but only when there is a single <category> in each <item> node, but i cant work out how to extend this to look at ALL the categories in the <item>. When i add additional <category> nodes, the xsl stops processing them. There was a lot of trial and error to get this far, but really struggling to get any further.
    <xsl:param name="cat">all</xsl:param>
    <xsl:key name="uniqueCategoryKey" match="item" use="./category"/>
    <select name="cat">
    <option value="all">all</option>
         <xsl:for-each select="//item[generate-id() = generate-id(key('uniqueCategoryKey', ./category))]">
              <xsl:choose>
                   <xsl:when test="$cat = category">
                        <option selected="{category}"><xsl:value-of select="category"/></option>
                   </xsl:when>
                   <xsl:otherwise>
                        <option value="{category}"><xsl:value-of select="category"/></option>
                   </xsl:otherwise>
              </xsl:choose>
         </xsl:for-each>
    </select>
    Any help appreciated on how to proceed
    Thanks

    Try changing these two lines:
    <xsl:key name="uniqueCategoryKey" match="/" use="/item/category"/>
    <xsl:for-each select="//[generate-id() = generate-id(key('uniqueCategoryKey', /item/category))]">And go back and read the article which you got the <xsl:key> idea from. It should explain why it did things that way. Understand that explanation and you should be able to modify the code to do what you like.

  • How do you override global variable values when calling oraxsl or xsl.exe?

    I am a newbie to oracle xslt.
    I have down loaded the latest version of xdk (10.1.0.2...). (Jan 2, 2009).
    In the past I haveI used micorsoft's "msxsl.exe" to perform my transformations.
    I am looking for a more up-to-date transformation tool.
    I found Oracle's version, and thought I would try it out.
    I have run the "bin/xsl.exe -hh" command.
    I read its help data. It states that variables are
    passed by coding a pramater "-V <var> <value>".
    I have also examined the oraxls.bat file.
    I found the documentation on "oracle.xml.parser.v2.oraxsl" class.
    It states that parameters are passed after the "-p" switch.
    It says the value of the -p parameter is "a list of paramemters".
    I don't find this sufficient information to be useful.
    I can spend days guessing, and I might get lucky.
    I thought it my be better to ask for help.
    I need to pass in (override) values for 3 global variables.
    I saw the method
    "setParam(namespace, variable, value)",
    near the documentation for the "oraxsl" class.
    How do you format the options string to communicate more than one param statement?
    (in either xsl.exe and/or oraxsl class).
    Suppose I have an xslt stylesheet as follows:
    ==================================================
    <?xml version="1.0" ?>
    <xsl:stylesheet version="1.1" xmlns:xsl='http://www.w3.org/1999/XSL/Transform' >
    <xsl:param name='a' select='"default_a"' />
    <xsl:param name='b' select='"default_b"' />
    <xsl:param name='c' select="'default_c"' />
    <xsl:template match='/'>
    this is value for a: <xsl:value-of select='$a' />
    this is value for b: <xsl:value-of select='$b' />
    this is value for c: <xsl:value-of select=$c' />
    <xsl:apply-templates />
    </xsl:template>
    </xsl:stylesheet>
    ========================================================
    Now as part of the calling of the XSL processor I want to change the value of these
    three global parameters.
    I want:
    a="current_a",
    b="current_b",
    and c="current_c"
    How do I express this using xsl.exe and its paramter string (-V ????).
    and/or how do I express it to the oraxsl class ( -p (xsl, a,"current_a"), (....) )???
    The syntax for specifying this information is not very clear in either situation.
    Of course I am making the "assumption" that by "param" they are
    refering to "global parameters" (as in my stylesheet), rather than some other global parameters of XLST.
    As an aside inquiry:
    I had hopped that the Oracle's xsl Verion 2 routine could handle xslt 2.0 commands
    such as "xsl:for-each-group", since it handled multiple xsl:outputs.
    From reading some of the documentation it seems it only handles xslt 1.0 syntax/commands.
    Is this true? (or is the documentation not up-to-date?).
    Any help on passing param values to xsl.exe and/or "oraxsl" class is appreciated.
    Thanks.

    Here is the line from one of my testing .bat files that passed in one parameter. I can't recall if I've passed in two, but this will give you a starting point for passing in multiple
    java -cp %CPath% oracle.xml.parser.v2.oraxsl -p show_image='yes' %ValXML% %ValXSLT% As for XSLT 2.0 support, it appears it does per {thread:id=503445}

  • XSL-How to get value of a variable from inside loop-- to the outside loop?

    Pls help
    hi im currently working on this xsl file..
    This works on generating a txt file,my problem right now is
    ' how can i get the value of a variable generated from the inside forloop,
    i have to get the total,sum value of this variables after performing the loop
    ***this is the for loop
    <xsl:for-each select="OutboundPayment">
    <xsl:variable name='id' select='generate-id(OutboundPayment)'/>
    <xsl:sort select="PaymentNumber/CheckNumber" data-type="text" />
    <xsl:variable name='PValue' select='format-number(100*PaymentAmount/Value,"0000000000000")'/>
    <xsl:value-of select='$id'/>
    <xsl:text>D</xsl:text>
    <xsl:value-of select='$DDate'/>
    <xsl:value-of select='$Batch'/>
    <xsl:text>3</xsl:text>
    <xsl:value-of select='format-number(PaymentNumber/PaymentReferenceNumber,"0000000000")'/>
    <xsl:value-of select='format-number(PayeeBankAccount/BankAccountNumber,"0000000000")'/>
    <xsl:value-of select='substring(Payee/Name,1,20)'/>
    <xsl:value-of select='$PValue'/>
    <xsl:variable name='Addend' select='concat($DDate,substring($DAcct,5,5),$Batch)'/>
    <xsl:variable name="LHash">
    <xsl:call-template name="GetHash">
    <xsl:with-param name="A1" select="$PValue" />
    <xsl:with-param name="A2" select="$Addend" />
    </xsl:call-template>
    </xsl:variable>
    <xsl:value-of select="concat('[',$LHash,']')" />
    <!--LHash*i have to get the total amount of this one from the outside loop /---->
    <xsl:call-template name='NewLine'/>
    </xsl:for-each>
    <!--I have to put in here the total value of that LHash/---->
    <!--This is the template on how to get the value of that variable in the inside loop/---->
    <xsl:template name="GetHash">
    <xsl:param name='A1'/>
    <xsl:param name='A2'/>
    <xsl:variable name='TwoSum' select='format-number($A1+$A2,"000000000000000")'/>
    <xsl:variable name='Weight' select='317191314191112'/>
    <xsl:call-template name="WDigit">
    <xsl:with-param name="Cnt" select="15"/>
    <xsl:with-param name="Sum" select="$TwoSum"/>
    <xsl:with-param name="Wgt" select="$Weight"/>
    <xsl:with-param name="Tot" select="0"/>
    </xsl:call-template>
    </xsl:template>
    <xsl:template name='WDigit'>
    <xsl:param name='Cnt'/>
    <xsl:param name='Sum'/>
    <xsl:param name='Wgt'/>
    <xsl:param name='Tot'/>
    <xsl:choose>
    <xsl:when test="$Cnt > 0">
    <xsl:variable name='Multip' select='substring($Wgt,$Cnt,1)'/>
    <xsl:variable name='Factor' select='substring($Sum,$Cnt,1)'/>
    <xsl:variable name='Prduct' select='$Multip$Factor'/>
    <!--xsl:value-of select="concat($Tot,'[',$Cnt,']')"/-->
    <!--xsl:value-of select="concat($Multip,'x',$Factor,'=',$Prduct)"/-->
    <!--xsl:call-template name='NewLine'/-->
    <xsl:call-template name="WDigit">
    <xsl:with-param name="Cnt" select="$Cnt - 1"/>
    <xsl:with-param name="Sum" select="$Sum"/>
    <xsl:with-param name="Wgt" select="$Wgt"/>
    <xsl:with-param name="Tot" select="$Tot+$Prduct"/>
    </xsl:call-template>
    </xsl:when>
    <xsl:otherwise>
    <xsl:variable name="Rem" select="$Tot mod 11"/>
    <xsl:variable name="Chk" select="11 - $Rem"/>
    <xsl:value-of select="format-number(concat($Tot,$Chk),'00000')"/>
    </xsl:otherwise>
    </xsl:choose>
    <xsl:template name='GetTotal'>
    </xsl:template>
    Thanks in advance for those who are willing to help.
    -Leighya

    It would have helped if you had posted your code as CODE but as it is, I could hardly read it. My guess about what you are asking is, if you want a template to return a value, just write that value to the result stream inside the template.
    If that wasn't what you were asking, then please post your code in a readable format.

  • Unable to display a variable value in xml through xsl using coldfusion

    Hi ColdFusion Heroes ,
    Is their any one to help me in this issue . I am new to cold
    fusion , XML and XSL .
    Detail Explaination :
    develoment_files.cfm is a .cfm page , which includes an xml
    page .
    development_files_dropdown.xsl is a xsl page .
    develoment_files.cfm : Code is as follows .
    <CFDIRECTORY ACTION="LIST" DIRECTORY="#somepath#"
    NAME="DirContents" FILTER="p*">
    <CFQUERY DBTYPE="query" NAME="Files">
    SELECT *
    FROM DirContents
    WHERE Type = 'File'
    </CFQUERY>
    <CFOUTPUT><?xml version='1.0' encoding='UTF-8'?>
    <?xml-stylesheet type="text/xsl"
    href="../XSL/development_files_dropdown.xsl"?>
    <Test xmlns:xsi='
    http://www.w3.org/2001/XMLSchema-instance'>
    <CFLOOP QUERY="Files">
    <Directory>
    <DisplayName>#Name#</DisplayName>
    <FullPath>#Name#</FullPath>
    </Directory>
    </cfloop>
    </Test></CFOUTPUT>
    This file generates a query resulting files starting with p*
    and then it should be a file and manipulates in xml.
    development_files_dropdown.xsl pages is as follows.
    <?xml version='1.0'?>
    <xsl:stylesheet version="1.0" xmlns:xsl="
    http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html" indent="yes"/>
    <xsl:preserve-space elements="*"/>
    <xsl:template match="/">
    <xsl:apply-templates/>
    </xsl:template>
    <xsl:template match="Test">
    <B>Script Name: </B>
    <select name="T1_Dev_Script" CLASS="DevInput">
    <xsl:for-each select="Directory">
    <option>
    <xsl:attribute name="value">
    <xsl:value-of select="FullPath/text()"/>
    </xsl:attribute>
    <xsl:value-of select="DisplayName/text()"/>
    </option>
    </xsl:for-each>
    </select>
    </xsl:template>
    </xsl:stylesheet>
    This is only for the purpose of display .
    Now i want to get one particular file named "pfile" { Code is
    written in development_files.cfm page and kept it in a variable } I
    want to display it in #Name# filed. how can i do that ? I am
    getting XML Parsing error from javascript .
    Could any one look into this .
    Thanks & Regards,
    Nataraj G

    The first part is right -
    1) drag a text element onto the page, at a location in which you want the variable value to be displayed
    2) On the left hand bottom page - go to the web item properties for the text element
    3) scroll down to the specific properties for the item - in that uncheck the first two check boxes - display general text elements & display static filter values
    4) in the next item in the properties (List of text elements) click once on the box where List is written and then clcik on the small browse button that appears.
    5) in the window that opens, in the element type field, select variable/variable value as key (as per your requirement) and then under the element ID field type in the technical name of your variable that you want to display.
    click ok and save your template and try executing it.
    See if this solves your problem.
    regards,
    Nikhil

  • XSl formula for pulling values based on parameters or query strings

    Hello,
    I have a custom list in SharePoint
    List Column/Fields (any time a new item is created these are the fields that need values)
    Machine = ID2
    SpecLabel = text string value
    SpecValue = text string value
    Using DataFormWebPart
    I Filter values by Machine by creating a parameter with a query string as its source.
    And pull the values
    <xsl:value-of select="@SpecLabel" />
    <xsl:value-of select="@SpecValue" />
    On the browser I add the parameter to the URL sting to filter each machine ID.
    ?=Machine=1
    Back in the XSL i use the same parameter to pull the value of the string as my header title.
    <xsl:value-of select="$paramMachine"/>
    Problem
    I need a formula that will pull just the the SpecValue data for a specific item.
    Example: I have thee items below and I need to just pull the “SpecValue” for the Built Year which is 2014.
    Machine = 1
    SpecLabel = Speed
    SpecValue = 10
    Machine = 1
    SpecLabel = Color
    SpecValue = Red
    Machine = 1
    SpecLabel = Built YearSpecValue = 2014
    Any Suggestion? 

    Hi,
    According to your post, my understanding is that you wanted to the formula to filter a list item.
    You can create the formula similar like below.
    <xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row[@City = 'Abington']"/>
    More reference:
    http://sympmarc.com/2011/08/15/compound-filtering-in-data-view-web-parts-dvwps-with-sharepoint-designer/
    http://blog.jussipalo.com/2012/01/sharepoint-filter-data-form-web-part.html
    Thanks & Regards,
    Jason
    Jason Guo
    TechNet Community Support

  • Copying attribute values in xsl transformation

    Hi
    Does anyone know how to copy attribute values in a transfomation generated in a routing rule of a ESB routing service.
    When I inspect the generated xsl (after mapping elements), I can see that the xsl:value-of is used and therefore the element attributes of the original message are lost.
    Specifically when an element contains the xsi:nil attribute, I want to copy it to the target message.
    Suggestions would be greatly appreciated,
    Ruud

    Hi Nathalie,
    Thanks for your reply.
    I would like to elaborate a bit on our problem because I feel that we haven't reached a satisfactory solution yet.
    We are using ESB database adapters to perform DML operations on the database. However we expose these adapters using routing services to allow us to use filters, content based routing etc.
    Consider this example:
    I want to perform an update on a row in the database. If my soap call contains an empty element, this element will be ignored. If I want this the corresponding attribute in the database set to NULL then I have to add the xsi:nill="true" attribute to the element in my message. This works great when invoking the database adapter directly but when you place a routing service in front of it, the transformation will wipe out the xsi:nill="true" attribute on the element causing the database adapter to ignore the element instead of updating to NULL.
    We have found two workarounds:
    detectommissions="false" setting in the wsdl of the database adapter. All empty elements in the message will cause an update to NULL in the database. This means that for every update you always have to have all values in your message to prevent unwanted updates to NULL.
    Add a choose / when / otherwise construction in the transformation of the routing service. If the source element is empty we add an empty element in the destination message containing an xsi:nill="true" attribute, otherwise we just copy the value.
    This construction should be added for each attribute that must be updateable to null.
    Both of these solutions are not satisfactory because they eliminate the choice whether an empty element in the invoking soap call should be ignored or used to trigger an update to null.
    We would like to be able to detect the xsi:nill="attribute" on the invoking call and propagate this attribute to the call to the database adapter.
    Kind regards,
    Ruud

  • XSL - distinct-values

    Hi Vlad,
    I am encountering a problem with the xsl transform, if a value in the input xml is same in same/multiple orders, the unique values gets appended in the same node, in the below example, I have an order with SKU "2" with Qty "1" and SKU "4" with Qty "2", so, my csv file will come with 3 lines, 1 line for SKU "2" and 2 lines for SKU4. The output seems to append both the distinct values (like <ns0:quantity_ordered>*1 2*</ns0:quantity_ordered>) in the same node as shown in the example below. I don't know whether I am using a wrong key in the Item_Data or something else,
    I believe, I am not using the right condition to check for the distinct SKU or using a wron for-each condition, I am not sure if that is the problem. I would appreciate if you could point me to the problem.
    Thanks,
    Venkatesh

    Hi Vlad,
    That was really helpful. Thank You!
    I think this one is almost done except for one particular scenario, where, an order has a duplicate of same SKU (different qty), only one SKU is displayed under Item_data node.
    For example,
    Order 1001 has SKU 1 with Qty of 1 and a duplicate of the same SKU with Qty as 2, In this case, only the first SKU is used and the second one with the Qty 2 gets ignored.
    Order# SKU QTY
    1001 1 1
    1001 1 2
    The input xml would be
    <DailySummary>
         <OrderDetails>
                 <PurchaseOrderNumber>1001</PurchaseOrderNumber>
                 <SKU>1</SKU>
                 <Qty>1</Qty>
         <OrderDetails>
         <OrderDetails>
                 <PurchaseOrderNumber>1001</PurchaseOrderNumber>
                 <SKU>1</SKU>
                 <Qty>2</Qty>
         <OrderDetails>
    <DailySummary>The expected output is,
    <ns2:item_Data>
                <ns0:vendor_item_number>1</ns0:vendor_item_number> (SKU)
                <ns0:quantity_ordered>1</ns0:quantity_ordered> (QTY)
                <ns0:quantity_shipped>1</ns0:quantity_shipped>
                <ns0:unit_cost>1</ns0:unit_cost>
                <ns0:extended_cost>1</ns0:extended_cost>
             </ns2:item_Data>
             <ns2:item_Data>
                <ns0:vendor_item_number>1</ns0:vendor_item_number> (SKU)
                <ns0:quantity_ordered>2</ns0:quantity_ordered> (QTY)
                <ns0:quantity_shipped>2</ns0:quantity_shipped>
                <ns0:unit_cost>1</ns0:unit_cost>
                <ns0:extended_cost>2</ns0:extended_cost>
             </ns2:item_Data>
          </ns1:order>The XSL used to transform is shown below, There is a for each distinct-values for the SKU, can the 'for each' be combined to check for SKU and Qty?, so that for an order if SKU is distinct and Qty is not then take both SKU's and appropriate qty.
                <xsl:for-each select="fn:distinct-values(/tns:DailySummary/tns:OrderDetails[tns:PurchaseOrderNumber = $tmpOrdNo]/tns:SKU/text())">
                  <xsl:variable name="tmpSKU" select="."/>
                  <ns2:item_Data>
                    <ns0:vendor_item_number>
                      <xsl:value-of select="/tns:DailySummary/tns:OrderDetails[tns:PurchaseOrderNumber = $tmpOrdNo and tns:SKU = $tmpSKU][1]/tns:SKU"/>
                    </ns0:vendor_item_number>
                    <ns0:quantity_ordered>
                      <xsl:value-of select="/tns:DailySummary/tns:OrderDetails[tns:PurchaseOrderNumber = $tmpOrdNo and tns:SKU = $tmpSKU][1]/tns:QtyOrdered"/>
                    </ns0:quantity_ordered>
                    <ns0:quantity_shipped>
                      <xsl:value-of select="/tns:DailySummary/tns:OrderDetails[tns:PurchaseOrderNumber = $tmpOrdNo and tns:SKU = $tmpSKU][1]/tns:QtyShipped"/>
                    </ns0:quantity_shipped>
                    <ns0:unit_cost>
                      <xsl:value-of select="/tns:DailySummary/tns:OrderDetails[tns:PurchaseOrderNumber = $tmpOrdNo and tns:SKU = $tmpSKU][1]/tns:Price"/>
                    </ns0:unit_cost>
                    <ns0:extended_cost>
                      <xsl:value-of select="/tns:DailySummary/tns:OrderDetails[tns:PurchaseOrderNumber = $tmpOrdNo and tns:SKU = $tmpSKU][1]/tns:Net"/>
                    </ns0:extended_cost>
                  </ns2:item_Data>
               </xsl:for-each>
               I appreciate all your help,
    Thanks,
    Venkatesh

  • Xsl:sort attribute value templates for select and order

    I've tried the xdk_java_9_0_1_0_0.tar.gz update today and for that the reported bugs are still there : one urgent (quite a stopper for us) is this one
    <xsl:template match="/resultlist">
    <xsl:variable name="sortorder">descending</xsl:variable>
    <xsl:variable name="sortfield">name</xsl:variable>
    <xsl:for-each select="result">
    <xsl:sort select="./{$sortfield}" order="{$sortorder}"/>
    <xsl:value-of select="./index"/>,<xsl:value-of select="./name"/>
    </xsl:for-each>
    </xsl:template>
    still it does not replace {$sortfield} and {$sortorder}.

    This is known bug 1798018 in the Oracle XSLT processor.
    The only workaround I can think of is to use <xsl:choose> to optionally use different <xsl:for-each> blocks, one with order="ascending" and one with order="descending" as literal values.

Maybe you are looking for

  • Using iMac 27" as HD TV display?

    I would like to use my iMac as a display for a PS3. I am just wondering this act has been found to be damaging to the display or iMac itself. Is anyone currently doing this and has had any problems, or does it work just fine and I am over worried? If

  • Automatic AV Remediation

    We're working with Cisco ISE 1.3.0.876 and NAC Agent with posture policies and we need a remediation that automatically send to the Symantec Endpoint Protection server that's locally. How can we do that?

  • Rearrange Places and Shared in Finder's Sidebar

    Is it possible to rearrange categories in the Finder's sidebar? I would prefer that 'Places' is above 'Shared.'

  • After upgrade linux-firmware (20100606-1) lvm root will not be loaded

    Hello, I'm a newbie, although arch has been running for 2 years now on my server. after I've upgraded the system today with linux-firmware (20100606-1) (from kernel26-firmware(2.6.33.4-1), coreutils (8.5-2), dri2proto (2.3-1) udev (157-1),initscripts

  • Configuring RESTful Services in detail

    Hi Community, we've set up RESTful Services for our APEX installation, we've followed the Oracle documentation on how to do that. Now, there are some questions left: Is there a way for us to configure the RESTful services in detail? It looks like the