•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the XML, XSLT and XPATH section within the Software Development category of DaniWeb, a massive community of 423,504 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,664 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our XML, XSLT and XPATH advertiser: Programming Forums
Views: 3271 | Replies: 21
![]() |
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 1
Solved Threads: 0
You can use the XPath expression wizard to create XPath expressions. XPath
expressions can be used to search through XML documents, extracting
information from the nodes (such as an element or attribute).
You can read more at
http://publib.boulder.ibm.com/infoce...jsp?topic=/com
.ibm.xsleditor.doc/topics/rlocpath.html
http://publib.boulder.ibm.com/infoce...jsp?topic=/com
.ibm.xsleditor.doc/topics/rfunct.html
expressions can be used to search through XML documents, extracting
information from the nodes (such as an element or attribute).
You can read more at
http://publib.boulder.ibm.com/infoce...jsp?topic=/com
.ibm.xsleditor.doc/topics/rlocpath.html
http://publib.boulder.ibm.com/infoce...jsp?topic=/com
.ibm.xsleditor.doc/topics/rfunct.html
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 1
Solved Threads: 0
Building a search engine that can be deployed over a parallel processing
architecture.
SQL query optimizers can parallelize operations, SQL engines can exploit
parallel architectures and use multiple processors for query evaluation and
execution. Clearly we want XML processing to be able to
exploit massively parallel processing, clusters, and other parallel
architectures.
SQL is set-oriented so it's possible to partition data across (processing)
nodes, partition queries, and combine results.An SQL query doesn't define a
navigation path for getting to data. The query just specifies what's wanted
and a query optimizer determines the most efficient means of execution.
So issue 1 is how to partition document collections for optimal parallel
execution with XPath and XQuery. I've not found any published research on
parallel evaluation or parallel execution with XPath.
The XPath 2.0 requirements document identifies the need for additional
string and aggregate functions, but doesn't define a requirement for being
able to invoke user-defined functions (UDFs). XQuery supports XPath
functions but it also supports UDFs.
If you are using an SQL products such as Oracle 8i and IBM DB2, you can add
UDFs for processing XML data by implementing them in Java, C/C++ and
deploying them as a database plug-in.For example, by implementing FOO() in
Java, I can use SELECT FOO() in SQL queries. It's possible to use FOO() in
parallel queries. DB2, for example, provides an ALLOW PARALLEL option when I
register my function classes with the database. Therefore, SQL queries can
still be "parallelized" if they include my Java, C/C++ UDFs. So issue is how
to express to XPath or XQuery details such as whether to use a single
instance of the Java class per query or allow parallel use of an UDF.
IBM Migration ToolKit (MTK) can be downloaded at
http://www-306.ibm.com/software/data/db2/migration/mtk/. More information can be found at
http://www-1.ibm.com/support/docview...id=swg27009230.
architecture.
SQL query optimizers can parallelize operations, SQL engines can exploit
parallel architectures and use multiple processors for query evaluation and
execution. Clearly we want XML processing to be able to
exploit massively parallel processing, clusters, and other parallel
architectures.
SQL is set-oriented so it's possible to partition data across (processing)
nodes, partition queries, and combine results.An SQL query doesn't define a
navigation path for getting to data. The query just specifies what's wanted
and a query optimizer determines the most efficient means of execution.
So issue 1 is how to partition document collections for optimal parallel
execution with XPath and XQuery. I've not found any published research on
parallel evaluation or parallel execution with XPath.
The XPath 2.0 requirements document identifies the need for additional
string and aggregate functions, but doesn't define a requirement for being
able to invoke user-defined functions (UDFs). XQuery supports XPath
functions but it also supports UDFs.
If you are using an SQL products such as Oracle 8i and IBM DB2, you can add
UDFs for processing XML data by implementing them in Java, C/C++ and
deploying them as a database plug-in.For example, by implementing FOO() in
Java, I can use SELECT FOO() in SQL queries. It's possible to use FOO() in
parallel queries. DB2, for example, provides an ALLOW PARALLEL option when I
register my function classes with the database. Therefore, SQL queries can
still be "parallelized" if they include my Java, C/C++ UDFs. So issue is how
to express to XPath or XQuery details such as whether to use a single
instance of the Java class per query or allow parallel use of an UDF.
IBM Migration ToolKit (MTK) can be downloaded at
http://www-306.ibm.com/software/data/db2/migration/mtk/. More information can be found at
http://www-1.ibm.com/support/docview...id=swg27009230.
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 1
Solved Threads: 0
The DB2 XPath functions are a subset of the XPath 2.0 and XQuery 1.0
functions and operators
-> fn:abs function (DB2 XPath) = The fn:abs function returns the absolute
value of a numeric value.
-> fn:boolean function (DB2 XPath) = The fn:boolean function returns the
effective boolean value of a sequence.
-> fn:compare function (DB2 XPath) = The fn:compare function compares two
strings.
-> fn:concat function (DB2 XPath) = The fn:concat function concatenates two
or more strings into a single string.
-> fn:contains function (DB2 XPath) = The fn:contains function determines
whether a string contains a given substring
-> fn:count function (DB2 XPath) = The fn:count function returns the number
of values in a sequence
-> fn:data function (DB2 XPath) = The fn:data function converts a sequence
of items to a sequence of atomic values
-> fn:normalize-space function (DB2 XPath) = The fn:normalize-space function
strips leading and trailing whitespace characters from a string and replaces
multiple consecutive whitespace characters in the string with a single blank
character.
-> fn:not function (DB2 XPath) = The fn:not function returns false if the
effective boolean value of an item is true, and true if the effective
boolean value of an item is false.
-> fn:round function (DB2 XPath)= The fn:round function returns the integer
that is closest to a numeric value.
-> fn:string function (DB2 XPath) = The fn:string function returns the
string representation of a value.
-> fn:string-length function (DB2 XPath) = The fn:string-length function
returns the length of a string
-> fn:substring function (DB2 XPath) = The fn:substring function returns a
substring of a string.
-> fn:sum function (DB2 XPath) = The fn:sum function returns the sum of the
values in a sequence.
functions and operators
-> fn:abs function (DB2 XPath) = The fn:abs function returns the absolute
value of a numeric value.
-> fn:boolean function (DB2 XPath) = The fn:boolean function returns the
effective boolean value of a sequence.
-> fn:compare function (DB2 XPath) = The fn:compare function compares two
strings.
-> fn:concat function (DB2 XPath) = The fn:concat function concatenates two
or more strings into a single string.
-> fn:contains function (DB2 XPath) = The fn:contains function determines
whether a string contains a given substring
-> fn:count function (DB2 XPath) = The fn:count function returns the number
of values in a sequence
-> fn:data function (DB2 XPath) = The fn:data function converts a sequence
of items to a sequence of atomic values
-> fn:normalize-space function (DB2 XPath) = The fn:normalize-space function
strips leading and trailing whitespace characters from a string and replaces
multiple consecutive whitespace characters in the string with a single blank
character.
-> fn:not function (DB2 XPath) = The fn:not function returns false if the
effective boolean value of an item is true, and true if the effective
boolean value of an item is false.
-> fn:round function (DB2 XPath)= The fn:round function returns the integer
that is closest to a numeric value.
-> fn:string function (DB2 XPath) = The fn:string function returns the
string representation of a value.
-> fn:string-length function (DB2 XPath) = The fn:string-length function
returns the length of a string
-> fn:substring function (DB2 XPath) = The fn:substring function returns a
substring of a string.
-> fn:sum function (DB2 XPath) = The fn:sum function returns the sum of the
values in a sequence.
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 1
Solved Threads: 0
You can download DB2 XML Extender product at
http://www-306.ibm.com/software/data...ort/fixpak.htm
l
http://www-306.ibm.com/software/data...ort/fixpak.htm
l
•
•
Join Date: Oct 2007
Posts: 76
Reputation:
Rep Power: 1
Solved Threads: 0
XML applications that manage millions of XML documents are not uncommon.
Thus, indexing support for XML data is required to provide high query
performance. DB2 supports path-specific value indexes on XML columns so that
elements and attributes frequently used in predicates and cross-document
joins can be indexed. DB2 also supports XML-aware full-text indexing.
Example: create index idx1 on dept(deptdoc) generate key using xmlpattern
'/dept/employee/name' as sql varchar(35)
The xmlpattern is a path which identifies the XML nodes to be indexed. It is
called xmlpattern and not xpath
because only a subset of the XPath language is allowed in index definitions.
For example, wildcards (//,*) and namespaces are allowed but XPath
predicates such as /a/b[c=5] are not supported. Since we do not require a
single XML schema for all documents in an XML column, DB2 may not know which
data type to use in the index for a given xmlpattern. Thus, the user must
specify the data type explicitly in the "as sql <type>" clause.
The following types can be used:
VARCHAR(n), VARCHAR HASHED, DOUBLE, DATE and TIMESTAMP
Thus, indexing support for XML data is required to provide high query
performance. DB2 supports path-specific value indexes on XML columns so that
elements and attributes frequently used in predicates and cross-document
joins can be indexed. DB2 also supports XML-aware full-text indexing.
Example: create index idx1 on dept(deptdoc) generate key using xmlpattern
'/dept/employee/name' as sql varchar(35)
The xmlpattern is a path which identifies the XML nodes to be indexed. It is
called xmlpattern and not xpath
because only a subset of the XPath language is allowed in index definitions.
For example, wildcards (//,*) and namespaces are allowed but XPath
predicates such as /a/b[c=5] are not supported. Since we do not require a
single XML schema for all documents in an XML column, DB2 may not know which
data type to use in the index for a given xmlpattern. Thus, the user must
specify the data type explicitly in the "as sql <type>" clause.
The following types can be used:
VARCHAR(n), VARCHAR HASHED, DOUBLE, DATE and TIMESTAMP
![]() |
•
•
•
•
•
•
•
•
DaniWeb XML, XSLT and XPATH Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Looking for projects (Post your Resume)
- Xpath navigation in xml file (XML, XSLT and XPATH)
- What exactly is xml? (RSS, Web Services and SOAP)
- Pascal to VB (Pascal and Delphi)
- Converting Pascal to VB (Visual Basic 4 / 5 / 6)
- XSLT weird problem... [urgent] (RSS, Web Services and SOAP)
- Access unqualified XML element (C#)
- Inharits userControl (C#)
- Does XHTML have a future? (IT Technologies and Trends)
Other Threads in the XML, XSLT and XPATH Forum
- Previous Thread: SAX API Packages
- Next Thread: Xquery in DB2


Linear Mode