54
Admin Guide – AutoStore 6.0
1163
Version 1.2
Copyright 2012 Notable Solutions, Inc.
</Book>
<Book>
<Title>Developing XML solutions</Title>
<Publisher>MSPress</Publisher>
</Book>
</Books>
You may want to send the image and the annotation to some folder. For this purpose, design a workflow
with AutoCapture, XML Importer and Send to Folder components.
On the Fields tab
of the XML Importer configuration, add the search field FilePath with corresponding
XPath query: *//Annotation.
On the Files tab
, add the following items:
1.
FileName = Image.jpg , Content Type = Base64, File Content = *//Image,
2.
Content Type = File Path, File Content = ~XIM::%FilePath%~.
Configure other components in the workflow. Run the process. Send the XML file to the process by
AutoCapture client. The following two files will be sent to the desired folder:
1.
Image.jpg - the image that was read from the XML file's node.
2.
annot1.txt - the annotation file found by the specified path that was retrieved from the XML file's
node.
Configuring
The component's configuration window contains the following settings:
Activate - use this combo box to activate the XML Importer component. You can use one of the
following alternatives:
•
Select Yes to enable the component.
•
Select No to disable the component. In this case the component won't perform any actions during
files processing.
•
Enter a custom value. If the entered value is equal to FALSE, NO, OFF or 0 (case-insensitive), then
all the settings in the configuration window become disabled. Else the settings are enabled. You
can use RRT
from the other components in this combo box. If this value is evaluated as TRUE, YES,
ON or 1 (case-insensitive) at runtime, then the component takes part in the workflow. If this value
is evaluated as FALSE, NO, OFF, or 0 (case-insensitive) at runtime, it does not perform any actions
during files processing. All other values at runtime will be regarded as invalid and the files will be
rejected.
Fields tab
- contains the list of search fields and the controls for managing this list.
Files tab
- contains the list of files and the controls for managing this list.
Delete original documents - if this check box is selected, the original XML document(s) will be deleted
and the component will pass only the RRTs
and/or added files to the subsequent components.
Otherwise, the original XML document(s) will be passed to the subsequent components.
46
Admin Guide – AutoStore 6.0
1164
Version 1.2
Copyright 2012 Notable Solutions, Inc.
Fields tab
This tab contains the list of search fields and the controls for managing its items.
Search Fields - this table displays list of the search fields that will be used for building RRTs
. Each item of
the list contains name of a search field, the value of Is required
option (True or False) for this field, and
text of the XPath query used to retrieve information for replacement of RRTs
built using this search field.
Add - click this button to add a new search field to the list. This button opens the Add New Field
dialog.
Edit - select a search field and click this button to edit the selected search field. This button opens the
Edit Field
dialog.
Remove - select a search field and click this button to remove the selected search field from the list.
Up - click this button to move to one item up in the list.
Down - click this button to move to one item down in the list.
Add New/Edit Field
This dialog allows addition/editing of a search field.
Field name - enter name of the search field.
Note:
RRTs should not be used in the Field name text box, since the entered name is used for building
ing
RRTs
for the subsequent components.
Is required - if this check box is selected, the component will require for all the specified XPath queries
to return a non-empty value as a result. If some query will not return any value at run time or will return
an empty value, an error message will appear at run time, and the component will reject the processed
document. If this check box is not selected and some query will return an empty value, the component
will replace an RRT
with empty value and a warning message will appear at run time.
XPath settings - this group of settings allows you to specify the parameters of the XPath query used for
retrieval of the information that will replace RRTs
for this field.
Namespace prefix - if namespaces are used in the XML file and you are going to create an XPath query to
receive an element or attribute belonging to a particular namespace, you should specify the namespace
prefix in this text box. For example, if your XML file contains the following specification:
xmlns:bk='urn:loc.gov:books' and you are going to use an XPath query //bk:title that refers to the
<bk:title> element, you should enter bk in this text box. The namespace prefix can be entered manually
or specified in the XPath Designer
dialog.
Namespace URI - if namespaces are used in the XML file and you are going to create an XPath query to
receive an element or attribute belonging to a particular namespace, you should specify the namespace
C# Word - Word Conversion in C#.NET Word documents in .NET class applications independently, without using other external third-party dependencies like Adobe Acrobat. Word to PDF Conversion.
remove text from pdf reader; how to delete text in pdf converter professional
41
Admin Guide – AutoStore 6.0
1165
Version 1.2
Copyright 2012 Notable Solutions, Inc.
URI in this text box. For example, if your XML file contains the following specification:
xmlns:bk='urn:loc.gov:books' and you are going to use an XPath query //bk:title that refers to the
<bk:title> element, you should enter urn:loc.gov:books in this text box. The namespace URI can be
entered manually or specified in the XPath Designer
dialog.
XPath query - enter the text of the XPath query for retrieval of the information that will replace RRTs
for
this field. You can enter the query text manually or click the Design button to design the query in the
opened XPath Designer
dialog.
Design - click this button to design an XPath query in the opened XPath Designer
dialog.
Files tab
This tab contains the list of data items that specify information about the files which should be loaded at
runtime.
Files - this table displays list of the items with information about the files. Each item of this list contains
name of the file (only for Base64 content type), content type (Base64 or File Path), the value of Is
required
option (True or False) for this file, and file content, i.e., information needed by the system to
load a file at runtime.
Add - click this button to add a new item to the list. This button opens the Add File
dialog.
Edit - select an item and click this button to edit the selected item. This button opens the Edit File
dialog.
Remove - select an item and click this button to remove the selected item from the list.
Note:
The order of files in the list does not matter. The component will first upload the required files,
then unrequired files.
Add/Edit File
This dialog allows adding or editing an item containing file information.
File name - specify the file name. You can use RRT
in this text box, in particular the RRT provided from
XPath queries configured on the Fields tab
. This text box is enabled only if the Base64 content type is
selected. In this case, it is mandatory to fill out this text box.
Content type - specify the type of content to determine how the file information will be get. You can
select one of two values:
54
Admin Guide – AutoStore 6.0
1166
Version 1.2
Copyright 2012 Notable Solutions, Inc.
•
Base64 - in this case the component will read the content encoded in Base64 format from the
node or attribute of the input XML file.
•
File Path - in this case the component will get the file located in the specified path.
Is required - if this check box is selected, the component will require the file to be loaded.
•
For Base64 content type, this means that the XPath query should return a non-empty value of the
file content. If the query will not return any value at run time or will return an empty value, an
error message will appear at run time, and the component will reject the processed document. If
this check box is not selected and some query will return an empty value, the component will
generate an empty file and a warning message will appear at run time.
•
For File Path content type, this means that the file should exist in the specified path. If there is no
file located in the specified path, an error message will appear at run time, and the component
will reject the processed document.
File content - specify information needed by the system to load a file at runtime. The form of this
information depends on the Content type value:
1.
For Base64 content type - specify the XPath query that will retrieve the content encoded in
Base64 format from the node or attribute of the input XML file. For example:
•
*//Title[.='Beginning XML']/../Text
•
*//KnowledgeDocument/@Content
You can enter the query text manually or click the Design button to design the query in the opened
XPath Designerdialog.
2.
For File Path content type - specify the full path of the file that will be loaded at runtime. This
path may consist of several RRTs and strings, in particular the RRT provided from XPath queries
configured on the Fields tab
may be used. For example:
•
\\Srv01\~XIM::%publisher%~\~XIM::%Author info%~
•
~XIM::%FilePath%~
Design - click this button to design an XPath query in the opened XPath Designer
dialog. This button is
enabled only if the Base64 content type is selected.
Note:
All the files that the component passes to the subsequent components should have different
names. If the component tries to create or upload a file, and another file with such name has
been already created/uploaded or an original file with such name is passed to the subsequent
component, then the component's behavior is as follows:
1.
For required file - the component gives an error message and the processed
document is rejected.
2.
For unrequired file - the component gives a warning message and the file is not
ot
48
Admin Guide – AutoStore 6.0
1167
Version 1.2
Copyright 2012 Notable Solutions, Inc.
created/uploaded.
If the Base64 content type is used and the query returns non-empty value that is not encoded
in Base64 format, then the component's behavior is as follows:
1.
For required file - the component gives an error message and the processed
document is rejected.
2.
For unrequired file - the component gives a warning message and the file is not
created/uploaded.
The order of the files in the Files tab
does not matter. The component will first upload the
required files, then unrequired files.
XPath Designer
This dialog allows you to browse XML file, create the XPath query and test its execution. XPath Designer
functionality has the same methods for getting both fields and files. There is the only difference: the
XPath query result can be either the search field(s) that will be used for building RRTs
(when this dialog
is opened from the Add New/Edit Search field
dialog) or the file(s) passed to the subsequent
components in the workflow (when this dialog is opened from the Add/Edit File
dialog).
Sample XML - this field displays the path to the XML file. Click the
button to open the XML file.
The file will be displayed in the window below.
Note:
The component does not open too big XML files in XPath Designer. The maximal limitation is
80000 symbols.
Field/ File name - specify the name of the search field that will be used for RRT
generation or the name
of the file that will be created using the query result.
Note:
RRTs should not be used in the Field name text box, since the entered name is used for building
g
RRTs
for the subsequent components.
Namespace prefix - if namespaces are used in the XML file and you are going to create an XPath query to
receive an element or attribute belonging to a particular namespace, you should specify the namespace
prefix in this text box. For example, if your XML file contains the following specification:
xmlns:bk='urn:loc.gov:books' and you are going to use an XPath query //bk:title that refers to the
<bk:title> element, you should enter bk in this text box.
Namespace URI - if namespaces are used in the XML file and you are going to create an XPath query to
receive an element or attribute belonging to a particular namespace, you should specify the namespace
URI in this text box. For example, if your XML file contains the following specification:
The image part with relationship ID rId545 was not found in the file.
47
Admin Guide – AutoStore 6.0
1168
Version 1.2
Copyright 2012 Notable Solutions, Inc.
xmlns:bk='urn:loc.gov:books' and you are going to use an XPath query //bk:title that refers to the
<bk:title> element, you should enter urn:loc.gov:books in this text box.
XPath query - enter the text of the XPath query. You can use any operators and symbols of the XPath
language. For example, the expression book[@type="Fiction"] refers to the <book> elements whose
type attribute is set to "Fiction". See more examples of the XPath queries in the description of the
component's usage
.
Test - click this button to test the XPath query execution. This button runs the XPath query and displays
the result set in the Result values table.
Result values - this table displays the results of the XPath query execution. The XPath query result can be
either the search field(s) that will be used for building RRTs
(when this dialog is opened from the Add
New/Edit Search field
dialog) or the file(s) passed to the subsequent components in workflow (when this
dialog is opened from the Add/Edit File
dialog).
If this dialog is used for getting search fields, and the XPath query returns several results, the component
creates indexed RRTs
for the query’s result set and one unindexed RRT for the first value. For example, if
an XPath query returns the result set containing three values of Invoice Number, the following four RRTs
will be created:
1.
~XIM::%Invoice Number%~
2.
~XIM::%Invoice Number_1%~ (contains the same value as the first unindexed RRT above)
3.
~XIM::%Invoice Number_2%~
4.
~XIM::%Invoice Number_3%~
For a single output, unindexed RRT will be created:~XIM::%Invoice Number%~.
If this dialog is used for getting files, and the XPath query returns several results, several files will be sent
to the subsequent components in workflow. The index will be added to the second and the next files'
names. For example, if you specify the file name as Image.tif, and the XPath query returns 2 results, the
following 2 files will be sent to the subsequent components:
1.
Image.tif
2.
Image_1.tif
Note:
If the result value is too long to be displayed in the Result values table, click on it to see the
e
whole value in the pop-up window.
26
Admin Guide – AutoStore 6.0
1169
Version 1.2
Copyright 2012 Notable Solutions, Inc.
Runtime Replacement Tags (RRT)
What are RRTs?
Runtime Replacement Tags (RRT) are tags placed within the configuration file for replacement by
metadata values during execution time. At runtime (when a component instance is executed within the
application), each component is responsible for searching all items within the configuration memory
structure and replacing their assigned RRTs with actual metadata values. The RRTs were formerly known
as Field Value References or FVRs.
How does it work?
When you create a process that consists of a series of components, the components are executed in
order from left to right (Capture to Route). Each component, prior to its termination, searches all
configuration entries and replaces all its own RRTs with actual metadata values. As an example, the XML
Knowledge Package Loader component will search for RRT's starting with "~ASX::" and replaces them
with actual metadata values.
The order of execution of components within a process is significant. Due to the component execution
order (Capture to Route), RRT's owned by components that appear later in a process cannot be placed
within components that appear earlier in a process. As an example, placement of Folder Store
component RRT's within a Capture component such as Poll Directory is invalid and will not be replaced
at runtime.
RRT naming convention
The figure below provides you with an illustration of the RRT definition. Each part of the RRT is designed
to create a standard field tag replacement that can be expanded to all components designed and
developed within the component framework.
34
Admin Guide – AutoStore 6.0
1170
Version 1.2
Copyright 2012 Notable Solutions, Inc.
Note:
RRT's are case sensitive. You must follow the proper case for all RRTs. You cannot introduce
space characters in between the RRT segments.
The table below provides details on each segment of the RRT:
Segment name
Description
Markers
Special characters used to mark the beginning and the ending of each RRT. The
"~" is used to mark each end. Note that you cannot use the same character
anywhere within the other parts of the RRT. Having "~" appear as a value of a
special field is not supported with this new RRT design.
RRT ID
Special three characters identifying the component owning the RRT and
responsible for replacing the tags with the actual values.
Separators
Double colon "::" characters used to separate the Component RRT ID from the
actual Replacement Tag Name. Double colon is now reserved and cannot be
used within other parts of the RRT. Example of an illegal use of :: is
"~MYC::Invoice::Number~" where the double colon is repeated within the
replacement tag name.
Replacement Tag
Name
The Replacement Tag Name or RTN can be the name of the metadata collected
from a content source (e.g., device, etc.), or a metadata generated by the
component itself (e.g., XML data field, etc.). The following types of RTN are
currently supported:
i) Reserved (RRTN) - Each component is allowed to create and maintain a set of
reserved RTN or RRTN. Within the boundaries of each component reserved
names have special meaning. Each component defines a list of RRTNs.
The image part with relationship ID rId546 was not found in the file.
Documents you may be interested
Documents you may be interested