Copy of BatchModel.seq 4.1

Is there a repository where I can find a copy blank Batch sequence models, parallel and Sequencial?

Thank you

This must be \Components\Models\TestStandModels except if of course this has been changed. In this case, you need to get from your CD of TestStand.

You could try to remove the modified files and then do a repair.

Tags: NI Software

Similar Questions

  • BatchModel - 10 loops and save the test report after each complete loop

    Hello everyone,

    We are using TestStand 2010 and currently using the BatchModel.seq for a quantity of 4 four DUT in a configuration of Burn-In.  Ten 10 times in a loop sequence of customer.  I wonder if there is a way to save the test at the end of each loop data report and create a new one for each of the loops after that.  Is this possible or I asking me too many software TestStand?  Thanks in advance for your responses to this last post.

    Kind regards

    Scott

    Hi Doug,.

    Thanks for the reply.

    I will discuss with my colleague who had a hand in the development of this customer file.  This customer file has been developed mainly by a contractor who works for our client.  These sound options as they will do the trick.  The customer file is used to Burn-In, so there are three levels of testing at three different temperature levels.  We strive to find some possible bugs in the code to that contractor that blocks the client file and all data is lost.  This will at least give us some options of data collection in a way that we should not worry if there is an error during the process and at least keep some data.  Thank you for your reply and if there is anything else, with that we have trouble, I'll post again.

    Kind regards

    Scott

  • Change the sequence of commands to generate two reports by USE with different names.

    I have a special situation for the model of batch processing.

    Each DUT consist of two distinct products that need to be tested as a single unit.

    I can run every USE and generate a test for each report.  -aka. The standard use case works very well.

    However, we would like the records using this method. So I need a copy with a different name for each series.

    The idea behind this is that we have a story running for each half of the UUT. Given that the two halves will probably never meet.

    I looked at the BatchModel.seq and read some of the documentation, but I'm having a hard time to understand what is happening.

    I guess the items highlighted above are where the object to measure reports are generated. However, I don't know the mechanism for giving them the names among the Options report-> report menu Pathname file or how to change between these two points in time. Also are there tricks to get the report in duplicate with a different path in this configuration.

    All links to the relevant information would be useful. Thank you

    Just copy these two steps and between them and the copies have another step that is just a statement.  There, you can change the path of the report by setting parameters. TestSocket.ReportFilePath the new path.

    Ideally what you would do, is that the client using a callback.  So, your code would look like this:

    Write the object to measure report

    Write the report of the object to be measured (on the fly)

    Define report path reminder (override in customer OR statement step)

    Write the object to measure report

    Write the report of the object to be measured (on the fly)

    Hope this helps,

  • Change Parameters.ReportOptions by the expression

    I'm testing five DUT with the batchmodel.

    Now, I want to save UUT statement of "c:\\test\\__'.»»

    For this purpose, I added expression to the sequence "ReportOptions:

    Parameters.ReportOptions.DisableReportGeneration = False,
    Parameters.ReportOptions.IncludeStepResults = True,
    Parameters.ReportOptions.AppendToFileIfItExists = False,
    Parameters.ReportOptions.Format = "html."
    Parameters.ReportOptions.BodyGenerator = "Sequence."
    Parameters.ReportOptions.BaseName = ""
    Parameters.ReportOptions.DirectoryType = "SpecifyByExpression"
    Parameters.ReportOptions.ReportFilePath = "c:\\test\\__«,»»
    Parameters.ReportOptions.GeneratePath = False,
    Parameters.ReportOptions.IncludeTimes = False,
    Parameters.ReportOptions.DateAndTimeFormat = "DateFirst."
    Parameters.ReportOptions.NewBatchFileNameForEachBatch = False

    Now, I get the following error:

    Details:

    There is an error produced the appellant 'save' in the 'report' of 'NI TestStand 2010 API.
    Invalid value or out of reach... Error writing to file 'c:\test\__.html'.

    Error code:

    -17300; Invalid or out of range value.

    Geographical area:

    Step 'Write batch report' sequence 'DUT Test' in 'BatchModel.seq '.

    What I am doing wrong? I have searched and tried a several think, but I can't find what's wrong.


  • Definition of deployment model

    Hello

    I use the latest version of TestStand and many test and deployment in the past, solutions created by using the sequential model.

    But this time, I use the model of batch, and I can understand not just how to include this setting in the deployment.

    I tried the following:

    1. Include public folders option - does not, like the testexec.ini, including the creation of the sequential model
    2. Include the file cfg/testexec.ini in the workspace and deployment - not working, getting ActiveX error on the deployment machine

    Would appreciate any help/tips

    This information is stored in:

    C:\ProgramData\National Instruments\TestStand 2012\Cfg\TestExec.ini

    Under

    [config]

    StationModelPath2 = "BatchModel.seq".

    You can write a simple executable that will alter this ini file.

    Add to the list of custom order of deployment. (check the command button custom in the deployment--> install options).

    Or

    You can do all your test sequence settings to use the model of batch process.

    Menu editing--> file in sequence--> properties--> Advanced--> model options tab require specific model.

    Overwrite the file testexec.ini is not good because she can already have some settings that are likely to be replaced.

    Editing it should work.

  • Override pre-batch reminder

    Hello

    TS 4.1using the batch process model - pre-batch is a two-step

    1. tell the dialogue for the next DUT

    2. wait for the dialog box.

    I need to change the #1 step, but still want to use step exsisting #2 - waiting for sous-suite of dialogue.

    How to call Wait for stage of subsequence of dialogue when recall pre-batch is overridden in customer file?

    Thank you.

    Instead of using the current just file that it points to the BatchModel.seq.  Who will work.  I have not tested, but I guess it would be.

  • Upgrades to 8 and restarted Firefox but when you try to start the message get FF this restart is required to complete installation; same message if I try to re - install or uninstall and seq. wrote this using Google Chrome.

    Upgrade to 8 FF (of 3.6) seem to go smoothly, as did restart on Acer desktop running Windows 7 Home Premium. But I get "reboot needed to complete the installation of FF" whenever I try to start and seq. tried uninstalling FF using the uninstall from the control panel and uninstall in my Mozilla folder - get the same message "Restart required". Tried to reinstall FF - same message. In short, totally unusable FF - and I'm starting to like Google Chrome.

    Please see:

      http://kb.mozillazine.org/Software_Update (Software Update not working properly)
    

    Delete the files:

    C:\Users\ < user > \AppData\Local\Mozilla\Firefox\Mozilla Firefox\updates (Firefox %LOCALAPPDATA%\Mozilla\Firefox\Mozilla)

    (Above is a windows installation - an installation Mac stores its files in /Applications/Firefox.app)

    To open one of these folders in OS x, Ctrl-click and select to display the contents of the package. )

    Download a new copy of Firefox for the installation.

    Uninstall your current version of Firefox before installing, but do not remove your profile data when you uninstall Firefox (do not select delete data of a personal nature) or you will lose your bookmarks and other data in the profile folder. Remove the Firefox program folder as well.

    Do a clean reinstall as an administrator. See:

    http://KB.mozillazine.org/Standard_diagnostic_-_Firefox#Clean_reinstall

    For more information on your profile folder, see profile management and:

      http://kb.mozillazine.org/Profile_folder_-_Firefox
      http://kb.mozillazine.org/Profile_backup
    

    Please let us know how you fare.

    revised to indicate the difference in path on Windows

  • What is the location of custom FrontEndCallbacks.seq TestStand 4.2?

    TestStand 4.2

    Windows XP

    I need to change the file

    C:\Program NIUninstaller Instruments\TestStand 4.2\Components\Callbacks\FrontEnd\FrontEndCallbacks.seq

    I would interfere not rather this file in the Directory.  TestStand manual seems to indicate that I can copy the file to

    \Components\Callbacks\FrontEnd\FrontEndCallbacks.SEQ

    On my system, this would result in

    C:\Documents and Settings\All Users\Application Data\National Instruments\TestStand 4.2\Components\Callbacks\FrontEnd\FrontEndCallbacks.seq

    However, the TestStand engine is not reading my modified copy of FrontEndCallbacks, and the only way that I can't seem to influence the FrontEndCallbacks is to replace the file in the Directory.  Do I have my file changed in the right location?  Am I missing something here?

    TestStand 4.1.1 I have a FrontEndCalbacks.seq personalized in the following directory:

    C:\Documents and Settings\All Users\Documents\National Instruments\TestStand 4.1.1\Components\Callbacks\FrontEnd

    Your directory you specify contains Application data that is used only for the Cfg directory and associated files:

    C:\Documents and Settings\All Users\Application Data\National Instruments\TestStand 4.1.1\Cfg

    I would check the documentation for the Directory, because I recall it was pointing me to the correct location for TS 4.1.1.

    Thank you

    Paul Holzrichter

  • When you build the deployment, install reportgen_txt.seq, but what program removal remove reportgen_txt.seq from the TestStand\Components\Models\TestStandModels directory?

    Basically, I want to install a reportgen_txt.seq to the Dir\Components\Models\TestStandModels TestStand Custom file during the installation of the program but when I remove the program from my computer I want to keep the custom file reportgen_txt.seq... Now when I remove the program, the custom reportgen_txt.seq file is also deleted.

    Someone at - it ideas in addition to having to have a second deployment to install the file?

    Help, please!  And thanks in advance

    I have advanced and implemented using custom orders, worked like a charm!  Thank you!

    I just added a personalized using xcopy (see below).  I needed three files to be copied in specific directories once they have been installed in the installation directory.  My three preconfigured files are:

    reportgen_txt. SEQ

    Users.ini

    TestExec.ini

  • Read the *.seq file.

    I need to get some info on my sequence, for example, the stage names. I guess that it is stored in the MySequence.seq file. How to read this file?

    Use the TestStand API

    http://zone.NI.com/reference/en-XX/help/370052G-01/tsapiref/infotopics/CSharp/

    Here is a c# example that reads and displays the contents of a. SEQ file.

    https://decibel.NI.com/content/docs/doc-3920

    I have a copy of this poster on my wall of partition

    http://www.NI.com/PDF/manuals/372844b.PDF

  • TestStand 2012, BatchModel treatment of intermittent problems result.

    During execution of the BatchModel results are supposed to be going to separate directories for each Socket.  What we see is that intermittently, the path is not correct for a few shots, that is to say the results for a socket will be written to the badly taken directory.

    What could be cause the shells to the incorrect path generator?

    To obtain the path and the following file names has been added to USE Start, in NI_ReportGenerator.seq:

    Parameters.ModelPlugin.PluginSpecific.Options.ReportFileBatchModelExpression = ""-"-... \\\Data\\\"+ Parameters.UUT.ModuleType + "-" + StationGlobals.JSFPNR.TestType + (Parameters.UUT.ModuleType == ""?) "" " (Reports\\\":"\\\Reports\\\") + Parameters.UUT.SerialNumber +" \ "+ Parameters.UUT.ModuleType +"[] - TR2_ _MSN"+ StationGlobals.JSFPNR.TestType +" _PN ["+ Locals.UUT.PartNumber +"] [] []. " \"",

    Parameters.ModelPlugin.PluginSpecific.Options.BatchFileBatchModelExpression = ""-"-... \\\Data\\\"+ Parameters.UUT.ModuleType + (Parameters.UUT.ModuleType == ""?) " (Reports\\\":"\\\Reports\\\") +" BatchReport [] []. " \""

    You can insert steps Lock acquire and release the lock "TestStand - determine report File Path Mutex" around the stage that you added AND current steps of determination of file report so that the report expression file values are not changed by a power outlet while being still used by another taken?

    Lock: Acquire 'TestStand - determine the report queue Path Mutex'

    Lock: Open early 'TestStand - determine the report queue Path Mutex'

  • SSLVPN package SSL-VPN-Client (seq:1): installed error: others

    "Try to install the package anyconnect-victory - 2.5.2019 - k9.pkg on a Cisco 1811 running c181x-advipservicesk9 - mz.124 - 22.T5.bin router, when I run the command in config mode" webvpn install flash: anyconnect svc - win - 2.5.2019 - k9.pkg ' I get "

    "SSLVPN package SSL-VPN-Client (seq:1): installed error: others" some proposed to reformat the flash drive, does anyone know a workaround or a way to do it without losing the configuration running?  I think that there is a problem with the structure of files on the router, the installation package is capable of "webvpn" installation directory.  All ideas are welcome, thanks!

    hostname #sh flash
    -# - length - time - path
    1 23472512 February 23, 2012 21:10:34 c181x-advipservicesk9 - mz.124 - 22.T5.bin
    2 0 23 February 2012 21:37:50 webvpn
    3 4686889 23 February 2012 21:18:46 anyconnect-victory - 2.5.2019 - k9.pkg

    3772416 bytes available (28168192 bytes used)

    Processor of 1811 (MPC8500) Cisco (revision 0 x 400) with 118784K / 12288K bytes of memory.
    10 FastEthernet interfaces
    Serial 1 interface
    1 line of terminal
    31360K bytes of ATA CompactFlash (read/write)

    Configuration register is 0 x 2102

    Host name #.

    I think it's because you have not enough space - he's trying to copy the file to the directory of webvpn.

    Make sure that the install webvpn command isn't in your configuration.

    Move the anyconnect package in the directory of webvpn

    run

    WebVPN install svc flash:/webvpn/anyconnect-win-2.5.2019-k9.pkg

    And see if that helps.

  • Backup files being missed when connect you seq # go to specified

    Hi DBAs,

    I backed up my logs for archiving my pre prod DB 10.2.0.5 because my mount point was full.

    but when I gave the script below:

    Run {}

    allocate channels ch01 type disk maxpiecesize 7000 M;

    allocate channels ch02 type disk maxpiecesize 7000 M;

    allocate channels ch03 type disk maxpiecesize 7000 M;

    allocate channels ch04 type disk maxpiecesize 7000 M;

    BACKUP tag ArchLogAll FILESPERSET FORMAT of 20 ' / oracledb/oradata/DBOEM/backupset/2014_06_09/%d_s_%s_p_%p_t_%t.bkp' ARCHIVELOG

    4410 SEQUENCE UNTIL SEQUENCE 4513 THREAD 1 ENTRY DELETE;

    Ch01 CHANNEL;

    OUTPUT CHANNEL ch02;

    OUTPUT CHANNEL ch03;

    OUTPUT CHANNEL ch04;

    }

    The script was successfully run which means that archived newspapers were supposed to be backed up and deleted as described in the script of seq. 4410 to 4513.

    But when I am gone again on the location of mount point to check if they have been removed after backup... I was shocked to see that he has saved and deleted following of random numbers and many have not saved and not deleted. For example seq. 4462,4492,4511 etc. don't were not saved.

    Any problem with my script or something another bad?

    Kind regards

    Ritu

    Ritu,

    If you have any archivelogs goes to two (or more) places (defined by log_archive_dest_N where N is 1 to...), Oracle can backup and remove a copy.  If you want to remove all copies, use REMOVE all THE ENTRIES.

    Before make you a LIST BACKUP OF ARCHIVELOG FROM SEQUENCE 4410 4513 sequence UNTIL they confirm that a single copy of each archivelog (sequence) has been saved.

    See the DELETE [ALL] ENTRY documentation under backupSpecOperand to http://docs.oracle.com/cd/B19306_01/backup.102/b14194/rcmsynta009.htm#sthref141

    Hemant K Collette

  • RMAN restore error - recovery of media asking unknown journal: thread 1 seq 7

    IM using RMAN to copy a database to another server. The new server is IDENTICAL to the former. By identical I mean she has the same break the name, ip address, operating system, directory structure and the Oracle version.

    The new server has already created instance, (same name as the old server example, paths etc.)

    The backup files have been restored manually on the new server, the same places that they were on the old. (RMAN makes a backup controlfile automatic and also the archivelogs on the old server).

    Ive restored the control file to the new server from the elements of RMAN backup.

    Ive cataloged items of RMAN backup on the new server.

    I know that the last available in the backup of the archivelogs sequence running on the new server:

    backup from the list of the archivelog all;

    List of backup sets
    ===================

    Time of accomplishment time BS key size Device Type
    ------- ---------- ----------- ------------ ---------------
    14,43 5 M DISK 00:00:03 11 MAY 11
    BP key: 9 situation: AVAILABLE Tablet: NO Tag: TAG20110511T163502
    Part name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\BACKUPSET\
    011_05_11\O1_MF_ANNNN_TAG20110511T163502_6WOC5833_. BKP

    List of newspapers archived on backup the value 5
    The next time that THRD Seq YVERT low low time next YVERT
    ---- ------- ---------- --------- ---------- ---------
    1 2 550217 10 MAY 11 556559 11 MAY 11
    1 3 556559 11 MAY 11 559776 11 MAY 11
    1 4 559776 11 MAY 11 560093 11 MAY 11
    1 5 560093 11 MAY 11 560794 11 MAY 11

    Time of accomplishment time BS key size Device Type
    ------- ---------- ----------- ------------ ---------------
    RECORD OF 15.50 K 7 00:00:01 11 MAY 11
    BP key: 10 location: AVAILABLE Tablet: NO Tag: TAG20110511T163653
    Part name: C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\BACKUPSET\
    011_05_11\O1_MF_ANNNN_TAG20110511T163653_6WOC8PMP_. BKP

    List of newspapers archived in backup set 7
    The next time that THRD Seq YVERT low low time next YVERT
    ---- ------- ---------- --------- ---------- ---------
    1 6 560794 11 MAY 11 560851 11 MAY 11


    So far its all perfectly fine.

    Now I want to restore the data files and recover. So I ran:

    RMAN run {restore database; recover database; alter database open resetlogs ;}}

    This gave me the result below is going very well, but I get a final error, I think that the error is because its search for an archive log that is not in the backup set, but it should be. However, I think 560851 SNA is for a journal that had not yet been created on the old server when the backup was run?

    I address, how to fix the error? Its interesting to note the journal, "archive log filename=C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\ARCHIVELOG".
    \2011_05_11\O1_MF_1_6_6WOK1X4W_. ARCH-recid = 10 = 750881741 "stamp is not on the old server or which explains why this isn't in the backup set.

    I can do an alter database open reset connects but Id prefer to know why its failure.


    Any help would be appreciated.

    ........................................................


    RMAN > run {restore database, recover databases; alter database open resetlogs ;}}

    From restoration to 11 May 11
    using channel ORA_DISK_1

    channel ORA_DISK_1: from datafile backupset restoration
    channel ORA_DISK_1: specifying datafile (s) to restore from backup set
    restoring datafile 00001 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\SAT\SYSTEM01. DBF
    restoring datafile 00002 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\SAT\UNDOTBS01. DBF
    restoring datafile 00003 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\SAT\SYSAUX01. DBF
    restoring datafile 00004 to C:\ORACLE\PRODUCT\10.2.0\ORADATA\SAT\USERS01. DBF
    channel ORA_DISK_1: backup C:\ORACLE\PRODUCT\10.2.0\FLASH_REC piece reading
    OVERY_AREA\SAT\BACKUPSET\2011_05_11\O1_MF_NNNDF_TAG20110511T163507_6WOC5CM7_. BKP

    channel ORA_DISK_1: restored the backup part 1
    room handle=C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\BACKUPSET\2011_05_
    11\O1_MF_NNNDF_TAG20110511T163507_6WOC5CM7_. Tag BKP = TAG20110511T163507
    channel ORA_DISK_1: restore complete, duration: 00:00:55
    Restoration finished in 11 May 11


    From back to 11 May 11
    using channel ORA_DISK_1

    starting media recovery

    channel ORA_DISK_1: from the archives to default destination log restore
    channel ORA_DISK_1: restore the newspaper archive
    archive log thread = 1 sequence = 6
    channel ORA_DISK_1: backup C:\ORACLE\PRODUCT\10.2.0\FLASH_REC piece reading
    OVERY_AREA\SAT\BACKUPSET\2011_05_11\O1_MF_ANNNN_TAG20110511T163653_6WOC8PMP_. BKP

    channel ORA_DISK_1: restored the backup part 1
    room handle=C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\BACKUPSET\2011_05_
    11\O1_MF_ANNNN_TAG20110511T163653_6WOC8PMP_. Tag BKP = TAG20110511T163653
    channel ORA_DISK_1: restore complete, duration: 00:00:01
    archive log filename=C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\ARCHIVELOG
    \2011_05_11\O1_MF_1_6_6WOK1X4W_. Wire ARC = 1 sequence = 6
    default channel: delete records or newspapers
    archive log filename=C:\ORACLE\PRODUCT\10.2.0\FLASH_RECOVERY_AREA\SAT\ARCHIVELOG
    \2011_05_11\O1_MF_1_6_6WOK1X4W_. ARCH-recid = stamp 10 = 750881741
    Cannot find the log archiving
    archive log thread = 1 sequence = 7
    RMAN-00571: ===========================================================
    RMAN-00569: = ERROR MESSAGE STACK FOLLOWS =.
    RMAN-00571: ===========================================================
    RMAN-03002: failure of the command recover at 11/05/2011 18:15:42
    RMAN-06054: recovery of media asking unknown journal: thread 1 seq 7 lowscn 560851

    RMAN >

    Published by: user12173666 on May 11, 2011 10:28

    He asked all of the available archives, whenever you give the database recovery, he keeps searching for the next archives, actually these archives are not yet generated, then you can ignore.

    Now just connect to SQL and give

    SQL > alter database open resetlogs;

    It should work.

  • Have an impact on changes in copy/change/return index?

    Hello

    I use the latest version of Berkeley DB XML (2.4.16).
    I use it to store relevant xml of .docx files archives... you can consider them as models in a document-generation application.

    The transformation of copy/change/return is used in several places.
    I also added the clues which can improve the queries that I am trying to make.

    I am interested in finding if index impact when using the transformations of copy/modify/back (it does not seem they help on the tests I've done).

    Here is the XQuery script that I use (I also wrote an xpath evaluation function that deals with simple XPath expressions that may contain attributes or the index... but it doesn't have an impact on the overall execution time):
    declare variable $productView as node() external;
    declare variable $templateName as xs:string external;
    declare variable $expressionValues as node() external;
    declare variable $docxMetadata as node() := doc('dbxml:/docxTemplates/templates.dbxml/metadata.xml')/templates;
    declare variable $customIdentifier as xs:string := fn:data($docxMetadata/template[name = $templateName]/dsStoreItemId) cast as xs:string;
    
    declare function local:getCustomXmlBlocksNode($template as xs:string) 
    {
         doc(fn:concat('dbxml:/docxTemplates/templates.dbxml/', $template, '_blocks.xml'))/*
    };
    
    declare function local:if-absent( $arg as item()* ,
        $value as item()* )  as item()* {
           
        if (exists($arg))
        then $arg
        else $value
    };
     
    declare function local:replace-multi($arg as xs:string?, $changeFrom as xs:string*, $changeTo as xs:string*) as xs:string? 
    {
         if (count($changeFrom)>0)
         then local:replace-multi
         (
              replace($arg, $changeFrom[1], local:if-absent($changeTo[1],'')), 
              $changeFrom[position() > 1], 
              $changeTo[position() > 1]
         )
            else $arg
    };
    
    declare function local:copy-attributes($copyTo as element(), $copyFrom as element())  as element() 
    {
         element { node-name($copyTo)}
                    { $copyTo/@*[not(node-name(.) = $copyFrom/@*/node-name(.))],
                  $copyFrom/@*,
                  $copyTo/node() }
     };
     
    declare function local:add-attributes 
      ( $elements as element()* ,
        $attrNames as xs:QName* ,
        $attrValues as xs:anyAtomicType* )  as element()? {
           
       for $element in $elements
       return element { node-name($element)}
                      { for $attrName at $seq in $attrNames
                        return if ($element/@*[node-name(.) = $attrName])
                               then ()
                               else attribute {$attrName}
                                              {$attrValues[$seq]},
                        $element/@*,
                        $element/node() }
    };
    
    declare function local:getEvaluation($expr as xs:string) as xs:string
     {
          fn:string($expressionValues/expressions/expression[name eq $expr]/value)
     };
    
    declare function local:renderSelectionParts($selPartName as xs:string*) as element()*
    {
         for $name in $selPartName
         return local:renderDocumentPart($name)
    };
    
    declare function local:evalPath($path as xs:string, $xml as node()*) as node()*
    {
       local:evalPathImpl(tokenize($path, "/"), $xml)
    };
    
    declare function local:evalPathImpl($steps as xs:string*, $xml as node()*) as node()*
    {
       if(empty($steps)) then $xml
       else if($steps[1] = "") then local:evalPathImpl(subsequence($steps, 2), $xml/root())
       else if(starts-with($steps[1], "@")) then local:evalPathImpl(subsequence($steps, 2), $xml/@*[name() = substring($steps[1], 2)])
       else if(ends-with($steps[1], "]")) then local:evalPathImpl(subsequence($steps, 2), $xml/*[name() = substring-before($steps[1],  "[")][fn:string(position()) = substring-before(substring-after($steps[1], "["), "]" )])
       else local:evalPathImpl(subsequence($steps, 2), $xml/*[name() = $steps[1]])
    };
    
    declare function local:renderRepeater($docPartName as xs:string, $blockNode as node(), $content as node(), $indexNames as xs:string*, $indexValues as xs:string*) as node()*
    {
         let $count := fn:count(local:evalPath(local:replace-multi(fn:string($blockNode/iw:ProductViewXPath), $indexNames, $indexValues), $productView))
         for $index in 1 to $count
              return local:renderRepeaterI($docPartName, $blockNode/iw:CCId, $content, ($indexNames, $blockNode/iw:KIdx/text()), ($indexValues, fn:string($index)))
    };
    
    declare function local:renderRepeaterI($docPartName as xs:string, $parentCCId as xs:string, $content as node(), $indexNames as xs:string*, $indexValues as xs:string*) as node()*
    {
         copy $c := $content
         modify (
              for $ccBlock in local:getCustomXmlBlocksNode($docPartName)/iw:Block[fn:string(iw:ParentContentControlId) eq $parentCCId]
              let $cc := $c//w:sdt[w:sdtPr/w:id/@w:val eq $ccBlock/iw:CCId]
              return
              (
                   if($ccBlock/iw:Type eq 'CalculatedControl') then 
                        insert node local:getDataBindingNode(local:replace-multi(fn:string($ccBlock/iw:ProductViewXPath), $indexNames, $indexValues)) into $cc/w:sdtPr
                   else if($ccBlock/iw:Type eq 'RepeaterDocPart') then
                        replace node $cc/w:sdtContent with element w:sdtContent { local:renderRepeater($docPartName, $ccBlock, $cc/w:sdtContent, $indexNames, $indexValues) }
                   else if($ccBlock/iw:Type eq 'RepeaterTable') then
                        replace node $cc/w:sdtContent/w:tbl/w:tr[last()] with local:renderRepeater($docPartName, $ccBlock, element content {$cc/w:sdtContent/w:tbl/w:tr[last()]}, $indexNames, $indexValues )
                   else ()               
              )
         )
         return $c/*
    };
    
    declare function local:getDataBindingNode($xpath as xs:string) as node()
    {
         local:add-attributes( element w:dataBinding{}, 
              ( xs:QName('w:prefixMappings'), xs:QName('w:xpath'), xs:QName('w:storeItemID') ), 
              ( "xmlns:iwpvp='http://interwoven.com/WordML07/ProductViewPlaceholders'", $xpath, $customIdentifier ) 
         )
    };
    
    declare function local:renderDocumentPart($docPartName as xs:string) 
    {
         copy $c := doc(fn:concat('dbxml:/docxTemplates/templates.dbxml/', $docPartName, '.xml'))/w:document/w:body
         modify (
              for $sectPr in $c/w:sectPr
              return delete nodes $sectPr,
              for $ccBlock in local:getCustomXmlBlocksNode($docPartName)/iw:Block[fn:string-length(iw:ParentContentControlId)=0]
              let $cc := $c//w:sdt[w:sdtPr/w:id/@w:val eq $ccBlock/iw:CCId]
              return
              (
                   if($ccBlock/iw:Type eq 'Expression') then 
                        replace node $cc/w:sdtContent/w:p with local:copy-attributes( element w:p {element w:r { element w:t { local:getEvaluation($ccBlock/iw:BindValue) } } }, $cc/w:sdtContent/w:p )
                   else if($ccBlock/iw:Type eq 'Switch') then
                        replace node $cc/w:sdtContent/* with local:renderDocumentPart(fn:string($ccBlock/iw:Items/iw:Item[local:getEvaluation(fn:string(iw:Info)) eq local:getEvaluation(fn:string($ccBlock/iw:BindValue))]/iw:DocPart))
                   else if($ccBlock/iw:Type eq 'Selection') then
                        replace node $cc/w:sdtContent/* with local:renderSelectionParts(fn:string($ccBlock/iw:Items/iw:Item[iw:Selected eq 'True']/iw:DocPart))
                   else if($ccBlock/iw:Type eq 'RepeaterDocPart') then
                        replace node $cc/w:sdtContent with element w:sdtContent { local:renderRepeater($docPartName, $ccBlock, $cc/w:sdtContent, (" "), ("")) }
                   else if($ccBlock/iw:Type eq 'RepeaterTable') then 
                   (
                        let $tr := $cc/w:sdtContent/w:tbl/w:tr[last()]
                        return replace node $tr with local:renderRepeater($docPartName, $ccBlock, element content {$tr}, (" "), (""))
                   )
                   else if($ccBlock/iw:Type eq 'DocumentPart') then
                        replace node $cc/w:sdtContent/* with local:renderDocumentPart($ccBlock/iw:BindValue cast as xs:string)
                   else ()               
              )
         ) 
         return $c/*
    };
    
    declare function local:renderDocument() 
    {
         copy $c := doc(fn:concat('dbxml:/docxTemplates/templates.dbxml/', $templateName, '.xml'))/w:document
         modify 
         (
              for $ccBlock in local:getCustomXmlBlocksNode($templateName)/iw:Block[fn:string-length(iw:ParentContentControlId)=0]
              let $cc := $c//w:sdt[w:sdtPr/w:id/@w:val eq $ccBlock/iw:CCId]
              return
              (
                   if($ccBlock/iw:Type eq 'Expression') then 
                        replace node $cc/w:sdtContent/w:p with local:copy-attributes( element w:p {element w:r { element w:t { local:getEvaluation($ccBlock/iw:BindValue) } } }, $cc/w:sdtContent/w:p )
                   else if($ccBlock/iw:Type eq 'Switch') then
                        replace node $cc/w:sdtContent/* with local:renderDocumentPart(fn:string($ccBlock/iw:Items/iw:Item[local:getEvaluation(fn:string(iw:Info)) eq local:getEvaluation(fn:string($ccBlock/iw:BindValue))]/iw:DocPart))
                   else if($ccBlock/iw:Type eq 'Selection') then
                        replace node $cc/w:sdtContent/* with local:renderSelectionParts(fn:string($ccBlock/iw:Items/iw:Item[iw:Selected eq 'True']/iw:DocPart))
                   else if($ccBlock/iw:Type eq 'RepeaterDocPart') then
                        replace node $cc/w:sdtContent with element w:sdtContent { local:renderRepeater($templateName, $ccBlock, $cc/w:sdtContent, (" "), ("")) }
                   else if($ccBlock/iw:Type eq 'RepeaterTable') then 
                   (
                        let $tr := $cc/w:sdtContent/w:tbl/w:tr[last()]
                        return replace node $tr with local:renderRepeater($templateName, $ccBlock, element content {$tr}, (" "), (""))
                   )
                   else if($ccBlock/iw:Type eq 'DocumentPart') then
                        replace node $cc/w:sdtContent/* with local:renderDocumentPart($ccBlock/iw:BindValue cast as xs:string)
                   else ()               
              )
         ) 
         return $c
    };
    
    element mainDocumentContent 
    {
         copy $c := local:renderDocument()
         modify 
         (
              for $cc in $c//w:sdt
              where fn:starts-with($cc/w:sdtPr/w:tag/@w:val, 'iw')
              return delete nodes $cc/w:sdtPr/w:placeholder/*,
              for $pictureCC in $c//w:sdt
              where $pictureCC/w:sdtPr/w:tag/@w:val eq 'iwPictureBlock'
              return delete nodes $pictureCC/w:sdtContent//a:blip/@r:embed,
              for $simpleCC in $c//w:sdt
              where fn:exists( fn:index-of( ('iwValueBlock', 'iwDateBlock', 'iwPictureBlock'), $simpleCC/w:sdtPr/w:tag/@w:val ) )
              return replace value of node $simpleCC/w:sdtPr/w:dataBinding/@w:storeItemID with $customIdentifier,
              let $sdtNodes := $c//w:sdt
              for $i in 1 to fn:count($sdtNodes)
              return replace value of node $sdtNodes[$i]/w:sdtPr/w:id/@w:val with $i
         ) 
         return $c
    }, 
    element customXmlPvpUri 
    { 
         fn:string($docxMetadata/template[name = $templateName]/customXmlPvpUri) 
    }
    ,
    element templatePath
    {
         fn:string($docxMetadata/template[name = $templateName]/path) 
    }
    Published by: donde on November 3, 2008 07:59

    Hello

    Index will not help the copied data. The indexes are limited to a particular container. Queries on this container will search for the appropriate indexes to optimize the query expression. Copied content is placed in a temporary storage that actually has a lot as a container, but is created without index so that queries that operate on this temporary copied content can be optimized using indexes.

    It's an interesting idea to think about the indexing of content, but there are all kinds of questions, I can think of that might occur. In any case, it's something to think about.

    If there is any way for you to cache and reuse the partially processed templates in a real (indexed) container'd win you indexes a bit more. Such a container could be in memory, so it serves as a pure cache. Should still transactions if you have concurrent access but it would disappear when the application is restarted. Just a thought.

    Kind regards
    George

Maybe you are looking for

  • How Satellite 2410 603 conenct to the adaptation of DV tape camcorder

    I have problems to copy cassettes dv from my camcorder to my computer - I have a toshiba satellite 2410 603 that is 4 years old. I think that I need an ilink cable, but don't know what I should buy for my pc that I searched on the net and find it ver

  • Why not, ido bar t backslash... When I try I get E

    WHY then, t I make the back slash, I get this E

  • identify the cartridge

    How to identify the cartridge HP *?  Shattered timе sticker. Just the serial number printed on plastc left. Initially it was HP131 or HP132. It works very well. It's the pair needs to be replaced.

  • Apple Sync at startup errors

    whenever I start my computer, I get the following messages, the 3_wal_check procedure entry point sqlite point could only be links injectors Dynamics 3.dll sqlite library. Apple sync notifier exe not found entry point Notifier sync Apple has stopped

  • Windows 7 Ultimate no longer serial accepts.

    I bought Windows 7 Ultimate SP1 32/64 bit in 2011 and have reinstalled several times on my pc. Recently, I ran Killdisk on disk because it is an older machine, and I was about to recycle. However, I decided to keep the pc mainly to play games more ol