OSB, XSLT, Assign and Replace

Hi
We are using OSB and using Assign and Replace over our codes....
Noticed 2 things:
Using ASSIGN, created a non-referential variable.... (ie When I am working with a XML (ie $body), if I grab certain parts of it's element, the new variable is a copy of the element and its not a reference therefore any change in the variable does not reflect on $body)... Is this TRUE? Will using an XQUERY function/proc give me a referential context?
Using a REPLACE/INSERT, the XPATH setting cannot accept a variable ie //targetlist/targetitem[{$idx}]/targetdata.... IS this TRUE? How can variables be used within XPATH?
Regards,
Dax

>
Noticed 2 things:
Using ASSIGN, created a non-referential variable.... (ie When I am working with a XML (ie $body), if I grab certain parts of it's element, the new variable is a copy of the element and its not a reference therefore any change in the variable does not reflect on $body)... Is this TRUE?
>
This is correct. New variable is a copy of the element and its not a reference.
>
Will using an XQUERY function/proc give me a referential context?
>
Xquery will return a new thing. So, it will not give you a referential context.
>
Using a REPLACE/INSERT, the XPATH setting cannot accept a variable ie //targetlist/targetitem[{$idx}]/targetdata.... IS this TRUE? How can variables be used within XPATH?
>
Never tried this. Will have to check.
By the way what exactly is the problem statement. What you want to do?

Similar Messages

  • I wrote an 2500 words assignment and saved in Microsoft word 97-2003 and by mistake replaced with another word file.How can i retain my original work?

    I wrote an 2500 words assignment and saved in Microsoft word 97-2003 and by mistake replaced with another word file.How can i retain my original work? 

    Hi,
    Does this happen to all 97-2003 Word files?
    Word 2013 now has lots of updates compared with earlier version of Word, lots of features have been updated. Use Word 2013 to open documents created in earlier versions of Word (Word 97-2003 format), you will probably encounter unexpected problems,
    expecially for those heavily formatted files.
    We would suggest you to convert your document to the Word 2013 file format, then you will be able to access the new and enhanced features in Word 2013.
    Regards,
    Ethan Hua
    TechNet Community Support
    It's recommended to download and install
    Configuration Analyzer Tool (OffCAT), which is developed by Microsoft Support teams. Once the tool is installed, you can run it at any time to scan for hundreds of known issues in Office
    programs.

  • Search and replace in powershell using wildcards

    Hi
    I'm trying to figure out how to replace a some random (ish) text, in a text string with a defined piece of text using Powershell.
    The text I want to replace is always between the same two words but the actual text varies from device to device.
    Lets say the text line is 
    Server this bit of text varies Language
    I want to replace the text between "Server" and "Language" with "it will always say this"
    I want to write something like this
    replace('Server'*'Language','Server it will always say this Language')
    so whatever is between Server and language is replaced with "it will always say this".
    I realise I've not got the regular expression correct. Can anyone help?
    Cheers
    Alex

    If you're replacing the line then you can replace all of the line with your new text. So for example you'd assign the line you want to a variable and replace it with a variable containing your new line.
    Take a look at this Blog post :
    http://blogs.technet.com/b/heyscriptingguy/archive/2011/03/21/use-powershell-to-replace-text-in-strings.aspx

  • Follow-Up and Replacement Articles in SAP Retail

    Hi everybody,
    Iu2019m using SAP Retail and I need to maintain Follow-Up and Replacement Articles.
    Iu2019ve created the Follow-Up Categories in the customizing and Iu2019ve assigned replacement article to the original article in transaction WRFFUART.
    Does anyone know how the subsequent process works? If I create a Purchase Order or a Sales Order to the original article, does the system automatically replace it by the replacement Article? Iu2019ve tested this but there was no substitution.
    Thanks in advance,
    SN

    Hi Barbara,
    I am analysing the functions for Follow-Up and Replacement Articles in SAP Retail ECC 6.0 Ehp. 3. I created Substitution profiles (SPRO: Logistics u2013 General -> Material Master -> Retail-Specific Settings -> Settings for Follow-Up/Replacement Material -> Maintain Follow-Up Categories) and assigned replacement article to the original article in transaction (WRFFUART). I also activated Substitution Processing and Start Replacement logic in Background (SPRO: Logistics u2013 General -> Substitution Processing -> Activate/Process Substitution Processing).
    I tested the process steps you posted (ME21N, VL10B, WSUBST_WORKLIST). There was no automatically substitution after creating the outbound delivery. And the transaction WSUBST_WORKLIST just shows u201CNo data available for selectionu201D.
    I analysed the application and found the table WSUBST_WORKLIST. It handles the entries for substitutions. It was empty. When I fill the table manually with data and run the WSUBST_WORKLIST the outbound delivery and the purchase order have a new position with the follow-up article but the original article is still there, unchanged.
    Why did the substitution not start automatically in background and why is the original article still in the purchase order and outbound delivery?
    It is also interesting, that the material quantity changed. The purchase order includes five units of the original article and the substituted article has a quantity of eight. I guess the reason is a rounding value for procurement.
    The ERP 2005 documentation on help.sap.com ([Assigning Follow-Up and Replacement Articles ERP 2005|http://help.sap.com/erp2005_ehp_02/helpdata/en/a2/7c936660dc4da09a3a1d08ee7eeca2/frameset.htm]) describes a conversation factor for the units of measure of the original article and substitution article for each assignment. In the ECC 6.0 documentation ([Assigning Follow-Up and Replacement Articles ECC 6.0|http://help.sap.com/saphelp_erp60_sp/helpdata/en/a2/7c936660dc4da09a3a1d08ee7eeca2/frameset.htm]) this is missing. In the system I also could not find any type of conversation factor for Follow-Up and Replacement Articles.
    Is this option not available in ECC 6.0 or where can I find it?

  • How to assign and transform or how to deal with xsd:anyType elements in 10g

    Hi,
    Any Update on this please...
    Hi,
    we are using canonical model as part of 10g, here I am not able to assign or tranform elements of type xsd:anyType to/from to other type elements. Solution with an example and quick reply is appreciated.
    =========================================
    Hi,
    By using copy-of xslt construct again input element structure is getting copied into the target mapper file, by using value-of xsl:construct just the value is getting assigned. Can you please elaborate on how to use this xsd:anyType elements in assign and tranform activities, overall how to use these elements in 10g, while implementing the canonical model.
    ex:
    xsl file: by using value-of
    <xsl:template match="/">
    <ns1:abstractRef>
    <ns1:amount>
    <xsl:value-of select="/ns1:BPELProcess1ProcessRequest/ns1:input"/>
    </ns1:amount>
    </ns1:abstractRef>
    </xsl:template>
    Result:
    <abstract1>
    -<abstractRef xmlns:ns1="http://xmlns.oracle.com/BPELProcess1" xmlns="http://sample/test">
    <ns1:amount>6556</ns1:amount>
    </abstractRef>
    </abstract1>
    Here amount is of type xsd;anyType which is present in the abstract complexType.
    xsl file: by using copy-of:
    <xsl:template match="/">
    <ns1:abstractRef>
    <ns1:amount>
    <xsl:copy-of select="/ns1:BPELProcess1ProcessRequest/ns1:input"/>
    </ns1:amount>
    </ns1:abstractRef>
    </xsl:template>
    Result:
    <abstract1>
    -<abstractRef xmlns:ns1="http://xmlns.oracle.com/BPELProcess1" xmlns="http://sample/test">
    <ns1:amount>
    <ns1:input>6556</ns1:input>
    </ns1:amount>
    </abstractRef>
    </abstract1>
    and while using it on assign activity, it is not assigning the input value to the xsd:anyType element, please provide an example on how to do this activity along with tranform.
    Edited by: user12679330 on Mar 1, 2010 4:46 AM

    >
    Try bpelx:append as a copy rule.
    >
    Since this thread is over three years old it will be interesting to see if OP is still waiting for a reply. ;)

  • A Script to Find and Replace Layer Names

    Are there any scripts to find and replace layer names?
    There is an excellent script available for Photoshop which allows you to not only replace words in layer names, but also insert words as Prefixes, Suffixes and Sequential Numbers.
    The illustrator version of this script only allows sequential numbering: It doesn't offer find and replacing of words.
    Ideally, it would be great if there was something that could do multiple find and replaces in one go:
    (e.g.
    You have layers like this Car, Dog, Bat
    You enter: car(Option1), dog(Option2), Bat(Option3)
    Your layers then become: Option1, Option2, Option3).

    big_smile, that's a very good start! Step 1 of Learning How To Script is indeed, adjusting an existing simple script to make it do more complicated things. (And usually then "break something", which is also a required part of the process.)
    You are correct in your observation this is repetitive stuff. For one or two different items that wouldn't be a problem, but in longer lists you soon get lost.
    The usual way of working with find-change lists is to build an array:
    var layernames = [
    [ 'FHairBowlBoy *Hair', 'Hairboy1' ],
    [ 'FHairCurlyafroBoy *Hair', 'Hairboy2' ],
    [ 'FHairSpikyBoy *Hair', 'Hairboy3' ],
    The general idea is to loop over all names, check if the current layer name is "layernames[i][0]" (the left column) and if so, rename it to "layernames[i][1]" (the right column). If you know how to write a loop in Javascript, then you can implement this right away.
    However ..
    A more advanced way to do this doesn't even need loop to over all layernames -- instead you can immediately "get" the correct name per layer! It's magic! Almost!
    The trick is to use a Javascript object instead of an array. Javascript objects are nothing special; Illustrator's 'layers' is an array of objects, and each object "layer" has a property "name", whose value you can read and set. What I do here is create a new object, where the "name" part is the original layer name and its value is the new layer name. All you need to check for per each layer is if there is a property 'object.originalLayerName', and if so, assign its value to that layer name.
    This looks a bit like the array above, except that (1) you use {..} instead of [..] to create an object, and (2) you add "name:value" pairs instead of "value" only (actually, the 'name' of a value in an array is simply its number).
    So this is what it looks like:
    // JavaScript Document
    var doc = app.activeDocument;
    // name indexed object
    var layernames = {
    'FHairBowlBoy *Hair':'Hairboy1',
    'FHairCurlyafroBoy *Hair':'Hairboy2',
    'FHairSpikyBoy *Hair':'Hairboy3'
    // loop through all layers
    for (var i = 0; i < doc.layers.length; i++)
    //Set up Variable to access layer name
    var currentLayer = app.activeDocument.layers[i];
    if (layernames[currentLayer.name])
      currentLayer.name = layernames[currentLayer.name];
    Enjoy!

  • New and replaced functionalities in ECC 6.0

    Hi all Experts,
    I want to know the New functionalities and replaced functionalities compared to 4.6C to ECC 6.0 in FICO Modules.
    I need Quick response from your side.
    Points will awarded..
    Regards,
    Soma.

    hi
    new Gl is the main functionality of ECC6
    u can know more about new GL at
    Re: Classic G/L and New G/L
    and also  check the link for Delta between 3.1-4.0- 46C - ECC5.0 & ECC 6.0
    http://solutionbrowser.erp.sap.fmpmedia.com/
    assign points if useful
    regards
    Srilakshmi

  • OSB XSLT trasformations with input parameter

    Hi,
    how can I pass input parameters at XSLT trasformation in Assign activity?
    Thk
    L.

    Hi checked these links, but I didn't solve my problems :-(.
    I have this xslt resource:
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
    <xsl:template match="/">
         <xsl:param name="in_stringSearch"/>
         <fields>
              <xsl:for-each select="//*[starts-with(text(),$in_stringSearch)]">
                   <field>
                        <xsl:for-each select="ancestor-or-self::*">
                             <xsl:text>/</xsl:text>
                                  <xsl:value-of select="$in_stringSearch"/>
                             </xsl:for-each>
                   </field>
              </xsl:for-each>
         </fields>
    </xsl:template>
    </xsl:stylesheet
    I created an assign activity, in the expression field I selected xslt resource and linked above xslt resource, my question is, how I can pass 'in_stringSearch' to xslt from assign?
    Thk
    L.
    Edited by: user8874385 on 7-gen-2011 4.12
    Edited by: user8874385 on 7-gen-2011 4.13

  • How to find and replacing the path (url) given for data binding from type 'datasocket'

    Hi everyone,
    I'm sorry to pose this question as my own knowledge is still very limited.
    I have an assignment (bachelor level). We were asked to adjust a plc program in step7 so that multiple of an existing sequence could be run indepently.
    The settings for that sequence are controlled by labview. Sensor data is also viewed in labview.
    There is an existing labview VI that was made by someone else before us. It uses 'Datasocket' type for data binding. Because we would like to adjust this VI to be used with the other sequences, we would like to change the original path or URL quickly, as in a 'Find&Replace' solution. Yet the find and replace only works for objects or text, not entries in the properties.
    Can someone please tell me if there is a way to do is, without having to use shared variables, as we are not at all known with this type.
    Many thanks,
    Niels

    Dear Niels,
    Please find the attached example. I placed 5 controls on the front panel, all with a data socket URL (control 1 = URL1, control 2 = URL2 etc). Through property nodes I did the following;
    - I got a reference to the front panel
    - with this reference we can get an array of references to the controls on this front panel
    - one by one we will read the references and check the data socket URL from the control, we compare this with the URL we are searching
    - if found, stop we will use the reference to write a new URL to the control.
    Please notice the default values of the controls; it is set to search for URL3 and replace this with URL10, run the VI once and you will see that happening. I also included a sting indicator which will show you the label of the control which we find. Also a Boolean indicator in case we were not able to find the URL.
    I downsaved the VI to 8.6, I'm not sure in which version you are working, if you have 8.6 or higher you are able to open it. Hope this brings you further,
    Best regards,
    Martijn S
    Applications Engineer
    NI Netherlands
    Attachments:
    findURLexample.vi ‏12 KB

  • Search and replace selected text

    Is there a way to have search and replace only look in selected text and not the whole document? My problem is, e.g., in a table, the author used x's instead of checkmarks (our preferred). In Word I could highlight the text, search for X to replace with T (which I then set as WP Iconic font to show the T as a checkmark), then tell it to change all, and the x's would be corrected. I can't find that same command in InDesign and, therefore, have to go through each table and replace the X with a T.
    Also, is there a way to assign the first rows of an existing table as header (repeating) rows? I know how to tell it I want two header rows, but it creates new rows and I have to copy my text into the "header" rows.
    Thanks for all the help I get here!

    Both are actually easy to find in the online help ...

  • Search and Replace DQXI Transform for Status Codes

    I've been tasked with creating a Search and Replace transform to convert DPV status codes into the textual equivalents.  For example, a status code of "S20000" would convert to "A different city was assigned."
    There are over 200 possible combinations, so I'd like to know if someone else has done this, and would be willing to share their code.

    You could store all your patterns in a Map. Then iterate over the map inserting the patterns into a regex.

  • JTextPane Find and Replace

    I'm trying to do a find and replace in a JTextPane. It's successful except that all the formatting is lost. I assume it's because getText() and setText() don't keep the styles. Any help would be greatly appreciated.
    Scott
    package mainPackage;
    import javax.swing.*;
    import javax.swing.text.*;
    public class MyTextBox extends JTextPane {
        private String before = null;
        public void swap(String[] keys, String[] replacements) {
            if(keys == null || replacements == null) {
                return;
            if (before == null) {
                try {
                    before = this.getDocument().getText(0, this.getDocument().getLength());
                } catch (BadLocationException e) {
                    e.printStackTrace();
            String after = new String(before);
            for (int i = 0; i < keys.length; i++) {
                after = after.replaceAll(keys, replacements[i]);
    this.selectAll();
    this.replaceSelection(after);
    repaint();

    I revise my earlier statement.
    select() and replaceSelection() didn't handle the attributes correctly. The inserted text picked up the attributes of the next character. I think - this is still really sketchy for me. If I replaced a word that was underlined (for example), the replacement would pick up the attributes of the space immediately after the word. If the space was underlined, the replacement was underlined, and if not, then not.
    The following seems to work, though I haven't really done anything with paragraph attributes yet:
    try {
        setCaretPosition(pos); // where pos = position of first character of the string to replace
        AttributeSet ca = this.getCharacterAttributes();
        AttributeSet pa = this.getParagraphAttributes();
        this.getDocument().remove(pos, keysString.length());
        this.getDocument().insertString(pos, replacementString, ca);
        this.getStyledDocument().setParagraphAttributes(selection[0], replacementString.length(), pa, false);
    } catch (BadLocationException e) {
        e.printStackTrace();
        System.exit(-1);
    }I've also added the Dukes back and will be assigning them now to you two guys that helped, even though I didn't originally think you had :)
    Thank you.

  • What is the difference between "Replace" and "Replace by Security"

    Hi all,
    I am implementing FDM to Load data to HFM, I set them up with a proper security on the shared service and FDM. When I load data to HFM from FDM, there are 4 options to load data. (Replace, Merge, Accumulate, Replace by Security)
    A document states that
    Replace: Clears all account values from the target application, and replaces that the data in the application with the data in the load file.
    Replace by Security: Loads data to the target application only for members to which you have access.
    However, even if I used “Replace”, it worked with security which I set.
    Does anyone know what the difference between “Replace” and “Replace by Security”?
    Is there any way that FDM works without security?
    Thanks in advance
    taku

    The fact both methods are producing the same results will either be coincidence or perhaps because you are mis-interpreting the difference between the 2. When you run a Replace HFM will clear out all data based on the combination of Scenario, Year, Period, Entity and Value dimensions it does not care if you have set up security classes which may restrict access to any of the other dimensions i.e. Account, Custom1 thru 4. When you use Replace By Security HFM will still clear on the original criteria but it will respect security class restrictions set up on the other dimensions e.g. if you are assigned to a security class which is restricted to accessing only a certain subset of accounts, HFM will not clear data fro the accounts you don't have access to when you use Replace By Security

  • Search and Replace XML TAG using JAVA

    Hi All,
    I have an XML file, say RESULT.XML Which has about 30000 Lines (yes Thirty Thousand ). For some reason i need to replace an existing tag with a different tag(not the value inside the tag, But the tag itself) . I am facing a challenge. I will explain it as below.
    I have a csv file which has 2 values as given below
    <VALUE A> , <VALUE B>
    where <VALUE A> is an existing node in the RESULT.XML and <VALUE B> is the node that should replace <VALUE A> in the RESULT.XML
    i have 500 such entries in the file.
    Now i need to write a program to read the csv file, Search <VALUE A> in the RESULT.XML and Replace it with <VALUE B> of the csv file.
    please let me know how do i start with this.
    I really want to fix this issue.
    Existing Node = <Product ID="role (contact) 3" UserTypeID="Product Number">_
    To be changed to = <Product ID= role (contact)3" UserTypeID="Product Number">_
    please reply if you need any further information
    Thanks in Advance
    Manzoor

    Sounds like a job for XSLT or Perl not Java though it can be done in Java. In Java I would initially try
    1) Read the csv file using one of the many free CSV parsers and build a Map<String,String>.
    2) Create a Rewriter using the map keys as targets and use the map values as replacements.
    3) Read the XML file line by line and process each line with the Rewriter.
    4) Save each line to an output file.
    For a one-off task this would probably serve but it could prove very slow if you need to run this on a daily basis.

  • Find and Replace for XML

    I have requirements for searching through XML files and performing a number of different Find and Replace functions. They include Find and Replace:
    - on content in any element
    - on content within a specified element
    - on attribute values within a specified element
    - on attribute names within a specified element
    - on element type names themselves
    The last 2 Find and Replace types could invalidate the document. I'm thinking DOM would be most appropriate for this. Which java packages/classes/technologies are the best to use? BTW, I've got some experience with java and a little less with XML.
    Thanks....

    Hi, here is what I suggest: You can use DOM or JDOM as your tecnology. I prefer to use DOM because is the one I'm familiar with.
    For the first three assignments, you can use DOM methods to get node text, data, etc.(look for the API/examples in the web). For the 2 last assignments, you may need to use XSLT to produce the OUT put XML and in some cases use filtering and concatenation. See http://java.sun.com/webservices/docs/1.0/tutorial/index.html.
    Good luck!

Maybe you are looking for

  • Period Control- Mid period

    Hi All, I am trying to create two different depreciation keys. My FI fiscal year starts from July to June. One is with Period rule 01 i.e Pro rata at period start date. Example. If I create an asset any time during the month, the ordinary start depre

  • DETAILS OF GOODS ISSUE

    HI, CAN I GET ANY STANDARD REPORT WITH THE FOLLOWING COLUMNS. GOODS ISSUE DOC NO- MATERIAL- QTY-MVMT TYPE-G/L ACCT-VAL CLASS PLZ SUGGEST IF ANY OTHER ALTERNATIVES IF ANY. THAN

  • Partitioning a MyBook to use with fcp... can it be Mac Extended and FAT32?

    Hi, I'm a film student and a little while ago I just bought a MyBook 1T external hard drive (USB only). I'm looking into reformatting my hard drive because when capturing with fcp (straight to the hard drive) I keep getting an error at around 9 minut

  • How to make it look like the camera is following a zig zagging line

    I have an animated video where a person clicks a button and an arrow appears coming out of the right side of the computer. I would like to make it look like the camera follows the arrow as it zooms along a zig zag path and eventually ends at another

  • Setup table filling for c-- b-- f detailed levels

    Hello experts, we need yo fill setup tables for shopfloor contoro lapplciation. (oli4bw). for this we are filling for selections C , B and F detailed levels. we have triggered C frst and after 10 mnts B....is it fine or we need to fill one by one ???