Xsl for removing specific nodes and modifying one node.

Hello,
i have the urgent need to remove specific nodes
and modify one node in my XML.
the xml as input :
<?xml version="1.0" encoding="utf-8"?>
<PLOT>
  <REQUEST>
    <GET_LAYOUT>
      <PROPERTIES>
        <MAPNAME name="xxxx" />
       </PROPERTIES>
      <DATAFRAME id="MAIN">
        <LAYERLIST>
          <LAYERDEF id="0" visible="false" query="" />
          <LAYERDEF id="1" visible="false" query="" />
          <LAYERDEF id="2" visible="false" query="" />
          <LAYERDEF id="3" visible="false" query="" />
          <LAYERDEF id="4" visible="false" query="" />
          <LAYERDEF id="5" visible="false" query="" />
          <LAYERDEF id="6" visible="false" query="" />
          <LAYERDEF id="7" visible="false" query="" />
          <LAYERDEF id="8" visible="false" query="" />
          <LAYERDEF id="9" visible="false" query="" />
          <LAYERDEF id="10" visible="false" query="" />     
        </LAYERLIST>
        <MAPSERVICELIST>   
          <MAPSERVICEDEF  service="BASEMAP" >
            <LAYERLIST>
              <LAYERDEF id="2" visible="True" query="" />
              <LAYERDEF id="1" visible="False" query="" />
            </LAYERLIST>
          </MAPSERVICEDEF>
          <MAPSERVICEDEF service="MAP1">
            <LAYERLIST>
              <LAYERDEF id="4" visible="True" query="" />
              <LAYERDEF id="3" visible="True" query="" />
              <LAYERDEF id="2" visible="True" query="" />
              <LAYERDEF id="1" visible="False" query="" />
            </LAYERLIST>
          </MAPSERVICEDEF>
        </MAPSERVICELIST>
      </DATAFRAME>
    </GET_LAYOUT>
  </REQUEST>
</PLOT>
what i want to have is:
<?xml version="1.0" encoding="utf-8"?>
<PLOT>
  <REQUEST>
    <GET_LAYOUT>
      <PROPERTIES>
        <MAPNAME name="xxxx" />
      </PROPERTIES>
      <DATAFRAME id="MAIN">
        <LAYERLIST>
   <LAYERDEF id="6" visible="True" query="" />
            <LAYERDEF id="5" visible="True" query="" />
            <LAYERDEF id="4" visible="True" query="" />
            <LAYERDEF id="3" visible="False" query="" />
<LAYERDEF id="2" visible="True" query="" />
<LAYERDEF id="1" visible="False" query="" />       
        </LAYERLIST>
        <MAPSERVICELIST/>   
      </DATAFRAME>
    </GET_LAYOUT>
  </REQUEST>
</PLOT>
as you see, <MAPSERVICELIST/>   is empty and <LAYERLIST> contains all <LAYERDEF> of <MAPSERVICEDEF>/<LAYERLIST> 
 The ones  of BASEMAP  are kept unchanged  but the ones of MAP1 are having a new attribute value for id.
Thanks four your help.
Regards.

You can implement very straightforward map in BizTalk like below:
If you are interested in XSLT of this map, I copied below which visual studio gave me when i validated the map:
<?xml version="1.0" encoding="UTF-16"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" exclude-result-prefixes="msxsl var" version="1.0">
<xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
<xsl:template match="/">
<xsl:apply-templates select="/PLOT" />
</xsl:template>
<xsl:template match="/PLOT">
<PLOT>
<REQUEST>
<GET_LAYOUT>
<PROPERTIES>
<MAPNAME>
<xsl:if test="REQUEST/GET_LAYOUT/PROPERTIES/MAPNAME/@name">
<xsl:attribute name="name">
<xsl:value-of select="REQUEST/GET_LAYOUT/PROPERTIES/MAPNAME/@name" />
</xsl:attribute>
</xsl:if>
<xsl:value-of select="REQUEST/GET_LAYOUT/PROPERTIES/MAPNAME/text()" />
</MAPNAME>
<xsl:value-of select="REQUEST/GET_LAYOUT/PROPERTIES/text()" />
</PROPERTIES>
<DATAFRAME>
<xsl:if test="REQUEST/GET_LAYOUT/DATAFRAME/@id">
<xsl:attribute name="id">
<xsl:value-of select="REQUEST/GET_LAYOUT/DATAFRAME/@id" />
</xsl:attribute>
</xsl:if>
<LAYERLIST>
<xsl:for-each select="REQUEST/GET_LAYOUT/DATAFRAME/MAPSERVICELIST/MAPSERVICEDEF">
<xsl:for-each select="LAYERLIST/LAYERDEF">
<LAYERDEF>
<xsl:if test="../../../../LAYERLIST/LAYERDEF/@id">
<xsl:attribute name="id">
<xsl:value-of select="../../../../LAYERLIST/LAYERDEF/@id" />
</xsl:attribute>
</xsl:if>
<xsl:if test="@id">
<xsl:attribute name="id">
<xsl:value-of select="@id" />
</xsl:attribute>
</xsl:if>
<xsl:if test="../../../../LAYERLIST/LAYERDEF/@visible">
<xsl:attribute name="visible">
<xsl:value-of select="../../../../LAYERLIST/LAYERDEF/@visible" />
</xsl:attribute>
</xsl:if>
<xsl:if test="@visible">
<xsl:attribute name="visible">
<xsl:value-of select="@visible" />
</xsl:attribute>
</xsl:if>
<xsl:if test="../../../../LAYERLIST/LAYERDEF/@query">
<xsl:attribute name="query">
<xsl:value-of select="../../../../LAYERLIST/LAYERDEF/@query" />
</xsl:attribute>
</xsl:if>
<xsl:if test="@query">
<xsl:attribute name="query">
<xsl:value-of select="@query" />
</xsl:attribute>
</xsl:if>
</LAYERDEF>
</xsl:for-each>
</xsl:for-each>
<xsl:value-of select="REQUEST/GET_LAYOUT/DATAFRAME/LAYERLIST/text()" />
</LAYERLIST>
<MAPSERVICELIST>
<xsl:text> </xsl:text>
</MAPSERVICELIST>
<xsl:value-of select="REQUEST/GET_LAYOUT/DATAFRAME/text()" />
</DATAFRAME>
<xsl:value-of select="REQUEST/GET_LAYOUT/text()" />
</GET_LAYOUT>
<xsl:value-of select="REQUEST/text()" />
</REQUEST>
</PLOT>
</xsl:template>
</xsl:stylesheet>
You can highlight the issue if you have any specific one.
Please mark it as Answer if this answers your question
Thanks.
Mo
The contents I write here is my personal views, not the view of my employer and anyone else.

Similar Messages

  • 11g R2 and RAC One Node

    Hi,
    what is realy the advantage and difference between RAC and RAC One Node, since finaly we should switch to another server if a node/instance crashes.
    On IT Tips by Burleson Consulting it is said :
    What makes Oracle RAC One Node special is that it performs quick clone of the instance to a new node.
    Which for me means switch to another server on the RAC.
    Thanks for the explanations.

    - can be easily extended to multiple nodes.
    - you can use "Oracle Restart" which restarts your resources automatically
    - suppose you have several rac installation among your single databases you can manage a single node like you do with rac installations
    Edited by: Ronny Egner on Sep 28, 2009 4:29 PM

  • Can RAC and RAC One Node share the same servers ?

    Does anyone know if it is possible for RAC and the new 11gR2 RAC One Node to share the same set of physical servers i.e. in effect having 2 clusters sharing the same set of servers ( though you could argue RAC One node is a different type of clustering or even that it is not real clustering at all - more instance transporting ).
    Or does standard RAC always require exlusive use of the physical servers it is using as its nodes ?
    Any thoughts appreciated
    Jim

    Jimbo wrote:
    Does anyone know if it is possible for RAC and the new 11gR2 RAC One Node to share the same set of physical servers i.e. in effect having 2 clusters sharing the same set of servers ( though you could argue RAC One node is a different type of clustering or even that it is not real clustering at all - more instance transporting ).
    Or does standard RAC always require exlusive use of the physical servers it is using as its nodes ?
    Hi Jim,
    To deploy RAC we need Oracle Grid Infrastructure for a cluster (aka Oracle Clusterware) on top.
    What determine if it's Single /RAC /RAC one Node is the Installation of Oracle Database.
    So, Oracle Clusterware support on Same Cluster ( RAC/ RAC one Node / Single).
    You will need one installation for each Feature.
    e.g on Same Cluster
    ---> Grid Infrastructure GRID_HOME=/u01/app/11.2.0/grid
    --->> RAC one Node /ORACLE_HOME = /u01/app/oracle/product/11.2.0/racone_11203
    --->> RAC /ORACLE_HOME = /u01/app/oracle/product/11.2.0/rac_11203
    --->> SINGLE /ORACLE_HOME = /u01/app/oracle/product/11.2.0/db_11203
    For me make no sense RAC ONE NODE and RAC on same cluster.
    Because RAC ONE NODE is a RAC with less feature.
    Regards,
    Levi Pereira

  • RAC and RAC One Node on the same server?

    Hello all,
    Anyone know if having RAC and RAC One Node on the same server is possible, supported, and recommended? Our architecture group is moving towards this configuration as a standard, and I need solid direction about feasability.
    Thanks for any help you can provide.
    Jack Silvey| CVS Caremark | Executive Advisor, IT Systems | CVS Caremark

    Yes you can have the RAC and RAC one on the same cluster. For support and recommendations raise a service request with oracle support  

  • I want to use Firefox for a specific webpage and my Safari for the rest of my browsing. I have an Apple macbook and am very new to Firefox

    I want to use Firefox for a specific webpage and Safari for the rest of my browsing. I have an Apple macbook and am very new to Firefox

    I thought my response was clear, but to reiterate:
    1.  10.5.1.42
    2.  None, nada, zero, zilch.  I have no iPhone account with any carrier.  There is a deactivated ATT sim card in the3 phone.  Someone gave it to me.  I only want to use it as an iPod Touch.
    3.  PC with Windows 7 (I can offer more detailed info, but I am not sure how that would help.
    I had already read that link.  Reset did not resolve (both hard and soft)

  • Checkin for a specific username and password

    i have an html page where i enter username and password..now if i want that for a specific username and password only the next page say next.html is displayed otherwise the same page is diaplayed sayin that the usrename and password is to be reenterd...how can i do this servlets..also do tell me where to store the username and password

    I am sorry, I lost some code in cut and pasting it
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;   
    public class LoginServlet extends HttpServlet{
            private Connection con;
            private PreparedStatement pstmt;
            private Statement stmt;
            private ResultSet rs;
            private String pass = "";
            private String login,password,done;
            private HttpSession session;
            public void doPost(HttpServletRequest request,HttpServletResponse response)
            throws ServletException, IOException{
                    login = ""+request.getParameter("login");
                    password = ""+request.getParameter("password");
                    done = ""+request.getParameter("done");
                    session = request.getSession(true);
                    PrintWriter out = response.getWriter();
                    try{
                            Class.forName("oracle.jdbc.driver.OracleDriver");
                    }catch(Exception e){
                            out.println(e.getMessage());
                    try{
                            con = DriverManager.getConnection("jdbc:oracle:thin:scott/[email protected]:1521:csapw");
                            if(!(password.equals("")&&login.equals(""))){
                                    pstmt = con.prepareStatement("select password from logon where login = ?");
                                    pstmt.setString(1,login);
                                    rs = pstmt.executeQuery();
                                                         pass = "";
                                    while(rs.next()){
                                            pass = rs.getString(1);
                                    if(pass.equals(password)){
                                            session.setAttribute("login",login);
                                            if(done.equals("null")){
                                                    done = "";
                                                    pass = "";
                                                    response.sendRedirect("/ksenji/quiz2/shoponline.jsp");
                                            }else{
                                                    response.sendRedirect(done.substring(5));
                                    else{
                                            response.sendRedirect("/ksenji/quiz2/login.jsp?"+done);
                            else{
                                    response.sendRedirect("/ksenji/quiz2/login.jsp?"+done);
                    }catch(SQLException ex){
                            out.println(ex.getMessage());
               

  • [svn:fx-trunk] 15795: Initial check-in for removing unused rsls and the include-inheritance-dependencies-only features .

    Revision: 15795
    Revision: 15795
    Author:   [email protected]
    Date:     2010-04-28 14:01:58 -0700 (Wed, 28 Apr 2010)
    Log Message:
    Initial check-in for removing unused rsls and the include-inheritance-dependencies-only features.
    Changes to implement ?\226?\128?\147remove-unused-rsls feature. When the configuration option is true, RSLs associated with RSLs that are not used by the application are not loaded at runtime. The compiler logs the primary RSLs that are required with the number of failovers, if any.
    compiler/src/java/flex2/compiler/common/Configuration.java
                add ?\226?\128?\147remove-unused-rsls and ?\226?\128?\147include-inheritance-dependencies-only.
    compiler/src/java/flex2/compiler/CompilerSwcContext.java
                pass rslGroup to getSwcGroup.
    compiler/src/java/flex2/compiler/swc/SwcCache.java
                Add parameter to getSwcGroup to a group of rsls can be passed in.
    compiler/src/java/flex2/compiler/swc/SwcGroup.java
                Add a SwcGroup constructor that accepts a SwcGroup of Rsls. Use the RSLs to give preference to scripts that come from RSLs when duplicate scripts are merged.
    compiler/src/java/flex2/tools/CompcPreLink.java
    compiler/src/java/flex2/tools/PreLink.java
                Find the set of SWCs that are contributing code to the application. Use this set to restrict which RSLs are written to the generated root class. Log the RSLs that are required to give the user some feedback.
    compiler/src/java/flex2/tools_en.properties

    Ah, ok. I was in the assumption the PCI connect had something to do with the video connection. But it seems like Apple wanted to reinvented PCIe...
    I'm out of my territory here so feel free to ignore the following.
    These are the things I notice in your Xorg.0.log:
    [    19.474] (==) modesetting(G0): Depth 24, (==) framebuffer bpp 32
    [    19.474] (==) modesetting(G0): RGB weight 888
    [    19.474] (==) modesetting(G0): Default visual is TrueColor
    [    19.474] (II) modesetting(G0): ShadowFB: preferred YES, enabled YES
    [    19.500] (II) modesetting(G0): Output VGA-1-0 has no monitor section
    [    19.526] (II) modesetting(G0): EDID for output VGA-1-0
    [    19.526] (II) modesetting(G0): Using default gamma of (1.0, 1.0, 1.0) unless otherwise stated.
    [    19.526] (==) modesetting(G0): DPI set to (96, 96)
    What the hell is modesetting doing there?
    And have you tried the nvidia blob? It could be that this is not well supported by nouveau. Maybe check up with their IRC / mailing list.

  • Recursive node and Non Recursive node

    Hi,
    What is the difference between Recursive node and Non Recursive node ?
    Thanks,
    Teja

    Hi Teja
    Recursive node
    If you wish to represent a recursive data structure within the context, a recursive node is the correct node to use. The simplest example of recursive data within a hierarchical structure is a file system. A dictionary can contain either files or subdirectories. This definition is then repeated for each subdirectory level down the hierarchy.
    Within the context, a recursive node is a special node that has only two properties: name and repeatedNode. As with any context node, a recursive node must itself name, but the repeatedNode property is where the recursion is defined. This property holds a reference to some parent node and indicates that, at runtime, the location of the recursive node will be occupied by a node of the type indicated in the repeatedNode property.
    You should think of a recursive node as a design time placeholder used to indicate a node will be created at this location at runtime, and will be of the type named in the repeatedNode property.
    The node name identified by repeatedNode must lie on the direct path back to the context root node.
    When a recursive node is created at runtime it always created as a non-singleton node. This is a hard-coded feature and cannot be changed.
    Non recursive node is opposite to recursive node
    Regards
    Ruturaj

  • Want to keep the data on one node and allow remote nodes to read it?

    by default, we have a distributed cache with backupcount=1 and data is kept over all the members in equal parts
    is there a way to do set it another way: i need only one 'main' node to put entries into the cache and keep them locally, while remote nodes can only read entries? the reason for that - i want to update the entries on the main node quite frequently (do not them travel anywhere over the network) - while remote read operations are infrequent. Also, Iwant the whole dataset survive the shutdown of any secondary node. In other words, I need 'all eggs in one backet' with remote read access.

    Andrey -
    Provided the 'remote/secondary' nodes are within the local area network, you could use a dedicated distributed cache service; storage enabled
    on the 'main' node and storage disabled on the 'secondary' nodes. Access from outside the LAN will require configuring a proxy service on the
    'main' node and 'secondary' node access over Coherence*Extend.
    /Mark

  • Remove specific row and column from 2d array

    Hi,
    I would like to know how to remove the specific row and column from 2d array.
    for example, I have the original 4x4 array as below
    2 -1 -1 0
    -1 2 0 -1
    -1 -1 2 0
    -1 -1 -1 3
    let say that i want to remove row 2(bold) and column 2(bold), and the new 2d array should get as below
    2 -1 0
    -1 2 -1
    -1 -1 3
    Thanks.

    You can't remove elements of an array, it's fixed at a certain size once created. What you can do however is make a new array and only copy the things you want. Something like:public static void main(String[] args) {
        Integer[][] bar = new Integer[5][5];
        for (int i = 0; i < bar.length; i++) {
            Integer[] baz = bar;
    Arrays.fill(baz, i);
    System.out.println(Arrays.toString(baz));
    Integer[][] muu = new Integer[5][4];
    removeColumn(3, bar, muu);
    for (Integer[] mee : muu) {
    System.out.println(Arrays.toString(mee));
    Integer[][] smuu = new Integer[4][5];
    removeRow(3, bar, smuu);
    for (Integer[] mee : smuu) {
    System.out.println(Arrays.toString(mee));
    public static <T> void removeRow(int row, T[][] a, T[][] result) {
    if (row >= a.length) {
    throw new IllegalArgumentException("no row at " + row);
    for (int a_r = 0, result_r = 0; a_r < a.length; a_r++) {
    if (a_r == row) {
    continue;
    System.arraycopy(a[a_r], 0, result[result_r], 0, a[a_r].length);
    result_r++;
    public static <T> void removeColumn(int col, T[][] a, T[][] result) {
    for (int i = 0; i < a.length; i++) {
    if (col >= a[i].length) {
    throw new IllegalArgumentException("no column at [" + i + ", " + col + "]");
    for (int a_i = 0, r_i = 0; a_i < a[i].length; a_i++) {
    if (a_i == col) {
    continue;
    result[i][r_i] = a[i][a_i];
    r_i++;

  • Find the difference between two dates for the specific month and year

    Hi,
    I have two dates, start date is 30/12/2012 and end date is 04/01/2013. Using datediff I found the difference of days between two dates. But I find the no of days in January 2013. ie output is 4 instead of 6. I input month and year to find the no of days
    for that date. In this case I input Jan 2013. How can I sql this ?

    I don't understand how most of the answers provided here not analytically solving the problem with many cases possible.
    First let me understand you:
    You have 2 dates range and you want to calculate day range for specific month and year between the original date range.
    declare @for_month int = 1 --January
    declare @for_year int = 2013
    declare @StartDate date = '2012-12-20'
    declare @EndDate date = '2013-01-04'
    SELECT
    CASE
    WHEN (DATEPART(MONTH, @StartDate) = @for_month and DATEPART(MONTH, @EndDate) = @for_month) and ((DATEPART(YEAR, @StartDate) = @for_year or DATEPART(YEAR, @EndDate) = @for_year)) THEN
    DATEDIFF(DAY, @StartDate,@EndDate)
    WHEN (@StartDate < cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) and (@EndDate between (cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) and (cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date))) THEN
    DATEDIFF(DAY, DATEADD(MONTH, DATEDIFF(MONTH, -1, @EndDate)-1, 0),@EndDate)
    WHEN (@EndDate > cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date)) and (@StartDate between (cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) and (cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date))) THEN
    DATEDIFF(DAY, @StartDate,DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, @StartDate) + 1, 0))) + 1
    WHEN ((DATEDIFF(DAY, @StartDate, cast(DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date)) + 1, 0)) as date)) >= 0) and (DATEDIFF(DAY, cast(CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as date), @EndDate) >= 0)) THEN
    DATEDIFF(DAY, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as datetime), DATEADD(d, -1, DATEADD(m, DATEDIFF(m, 0, cast( CONVERT(varchar(4), @for_year) + '-' + CONVERT(varchar(2), @for_month) + '-01' as datetime)) + 1, 0))) + 1
    ELSE
    0
    END as [DD]
    I don't know how you calculate day range between 01/01/2013 and 04/01/2013
    is 4, it is actually is 3 but if that is the case, you can add 1 from the condition.

  • Alarm for a specific event and time

    My alarm works just fine, if I set it to ring like an alarm clock.  The problem is that from time to time if I enter a specific time and event, it will not alarm.
    For example:
    9:00 AM.  Phone home
    The alarm indicator will be checked in the preferences area, but no alarm will will "go off".  This does not happen all of the time.  What can I do?

    The only app that I know of that will sound an alarm even if the phone is muted is the built in Clock app. It does not have the ability to set an alarm for a specifc date. So, no, I don't believe what you want to do is possible.

  • How to allow suspense olny for a specific source and category

    Hi all
    I am using GL, AP, FA and CM. I have another system that i import a journal once a month. I want the users to be able to post this journal, even it is not balanced. I can do that by allowing suspense posting.
    My question is: Can i allow suspense posting only for journals that has specific source and category, and not allow suspense posting for all other journals created in GL??
    Thank you and best regards
    E.

    There does not appear to be a way to derive the internal id of a table that is not part of the interface. Instead of concentrating on getting the internal id, why do not you define flex fields for the fact table and specify internal ids of the relevant dimensions in it.

  • I have a friend from Montreal Canada who is in U.S.A. for 2 months. Her old iPad has to be replaced. Is there any compatibility problems with the iPad made for U.S.A. and those one made for Canada?

    I have a friend from Montreal, Canada who is in U.S.A. for 3 months. Her old iPad is not working very well and she thinks about buying a new iPad. Is there any compatibility problem between iPad sold in the States and those one sold in Canada?

    http://www.apple.com/ipad/specs/
    http://www.apple.com/ipad/LTE/

  • Nodes in RAC One Node configuration

    Dear all,
    11.2 on Windows 2008
    What is the maximum number of nodes we can have in RAC one node configuration ?
    Yoosuf

    Thanks Rafi and Sorry for not making it clear.
    The whole configuration will be rac one node (With 4 nodes) with out dataguard implementation.
    If the primary site goes down(s1,2 and storage) , can the secondary site wil be up automatically (s3,4 and storage). Please note storage is with ASM (normal redundancy ) primary storage at Head office and Secondary ASM storage at DR
    Thanks

Maybe you are looking for