XSLT+XPath Recursion

I want to ask you to help me. I have problem with next task :
Input data :
Input data : build.xml
<project name="name of project" default="compile" basedir=".">
<target name="all" depends="clean,compile"
description="Clean build and dist directories, then compile"/>
<target name="clean"
description="Delete old build and dist directories">
</target>
<target name="compile" depends="prepare"
description="Compile Java sources">
</target>
<target name="dist" depends="compile,javadoc"
description="Create binary distribution">
</target>
<target name="install" depends="compile"
</target>
<target name="javadoc" depends="compile"
description="Create Javadoc API documentation">
</target>
<target name="list"
</target>
<target name="prepare">
</target>
</project>
Me should build table of dependency using XSLT+XPath
Target Dependencies
clean
list
prepare
all ______ clean
________ compile
__________ - prepare
compile | prepare
dist ______ compile
___________ - prepare
javadoc
- compile
- prepare
install ____ compile
__________ -prepare
javadoc ___ compile
___________ -prepare
I have read article and done example (http://www.ibm.com/developerworks/xml/library/x-xslrecur/ )
Could you help me, please ?
My source :
<!-- -->
<tr style="background-color: gray;">
<td align="center">TARGET DEPENDENCY</td>
</tr>
<tr>
<td width="100%">
<table border="1"
class="targetDependencyANT" align="center">
<tr>
<td
style="background-color: olive">
Target
</td>
<td
style="background-color: olive">
Dependencies
</td>
</tr>
<xsl:call-template
name="printEmptyTarget" />
<xsl:call-template
name="printNotEmptyTarget" />
</table>
</td>
</tr>
<xsl:template name="printEmptyTarget">
<xsl:for-each select="project/target[not(@depends)]">
<tr>
<td>
<xsl:value-of select="@name" />
</td>
</tr>
</xsl:for-each>
</xsl:template>
<xsl:template name="printNotEmptyTarget">
<xsl:for-each select="project/target[@depends!='']">
<tr>
<td>
<xsl:value-of select="@name" />
</td>
<td>
<xsl:value-of select="@depends" />
<<<<<<<<<<<<< Start // This I have problem >>>>>>>>>>>>>>>>>>>>>>>>
<xsl:variable name="targetName" select="@name = @depends">
<xsl:value-of select="$targetName" />
<<<<<<<<<<<<< End // This I have problem >>>>>>>>>>>>>>>>>>>>>>>>
</xsl:variable>
</td>
</tr>
</xsl:for-each>
</xsl:template>
Edited by: Sun_day on Sep 14, 2007 1:48 AM

shree wrote:
1.Can you differentiate these XSLT, XPath and XQuery.XSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents. XSLT stands for XSL Transformations.
XQuery is to XML what SQL is to database tables. XQuery was designed to query XML data.
XPath is used to navigate through elements and attributes in an XML document. XPath is a major element in W3C's XSLT standard - and XQuery and XPointer are both built on XPath expressions.
http://www.w3schools.com/xsl/default.asp
http://www.w3schools.com/xquery/default.asp
http://www.w3schools.com/xpath/default.asp
Cheers,
Vlad

Similar Messages

  • XSLT, XPath and XQuery

    Hi,
    1.Can you differentiate these XSLT, XPath and XQuery.
    2.How Do I Force a Rollback in a BPEL Flow.
    Thanks in advance

    shree wrote:
    1.Can you differentiate these XSLT, XPath and XQuery.XSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents. XSLT stands for XSL Transformations.
    XQuery is to XML what SQL is to database tables. XQuery was designed to query XML data.
    XPath is used to navigate through elements and attributes in an XML document. XPath is a major element in W3C's XSLT standard - and XQuery and XPointer are both built on XPath expressions.
    http://www.w3schools.com/xsl/default.asp
    http://www.w3schools.com/xquery/default.asp
    http://www.w3schools.com/xpath/default.asp
    Cheers,
    Vlad

  • One or two XSLT/XPath bugs

    I have an XSLT problem that may actually be two problems. My stylesheet works as expected in MSXML and Xalan but does very weird things in Oracle's XSLT processor. Below is the stylesheet, followed by some test input. It looks like just one bug if you run it on this test input (the "extra rows" generated get numbered 10-14 rather than 20-24, but $count and $remainder seem to have the right values). If you delete all COWS after SEQNUM 13, however, then $count and $remainder are both wrong. So it may be one bug, may be two.
    XSLT:
    ====================================================
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <!-- output a CHICKENROW for each CHICKEN in the source document, and guarantee there's a positive multiple of 8 rows total -->
         <xsl:template match="/">
              <CHICKENROWS>
                   <xsl:for-each select="/COWS/COW[KEY1 = '1']">
                        <CHICKENROW seqnum="{SEQNUM}">
                             <xsl:value-of select="CHICKEN"/>
                        </CHICKENROW>
                   </xsl:for-each>
                   <xsl:variable name="count" select="count(/COWS/COW[KEY1 = '1'])"/>
                   <!-- uncomment this for debugging
                   <count><xsl:value-of select="$count"/></count>
                   -->
                   <xsl:variable name="remainder" select="$count mod 8"/>
                   <!-- uncomment this for debugging
                   <remainder><xsl:value-of select="$remainder"/></remainder>
                   -->
                   <!-- if we have fewer than a positive multiple of 8 rows, add empty rows -->
                   <xsl:if test="$count = 0 or $remainder &gt; 0">
                        <xsl:variable name="startSeqnum">
                             <xsl:choose>
                                  <xsl:when test="/COWS/COW[KEY1 = '1']/SEQNUM">
                                       <xsl:for-each select="/COWS/COW[KEY1 = '1']/SEQNUM">
                                            <xsl:if test="not(/COWS/COW[KEY1 = '1' and SEQNUM &gt; current()])">
                                                 <xsl:value-of select=". + 1"/>
                                            </xsl:if>
                                       </xsl:for-each>
                                  </xsl:when>
                                  <xsl:otherwise>
                                       <xsl:text>1</xsl:text>
                                  </xsl:otherwise>
                             </xsl:choose>
                        </xsl:variable>
                        <!-- insert as many empty rows as necessary to guarantee we have at least 8 rows and the total # of rows is a multiple of 8 -->
                        <xsl:call-template name="emptyRows">
                             <xsl:with-param name="seqnum" select="$startSeqnum"/>
                             <xsl:with-param name="endSeqnum" select="$startSeqnum + (8 - $remainder) - 1"/>
                        </xsl:call-template>
                   </xsl:if>
              </CHICKENROWS>
         </xsl:template>
         <!--
              Recursively insert empty rows with seqnums starting at $seqnum and going to $endSeqnum
         -->
         <xsl:template name="emptyRows">
              <xsl:param name="seqnum"/>
              <xsl:param name="endSeqnum"/>
              <xsl:if test="$seqnum &lt;= $endSeqnum">
                   <CHICKENROW seqnum= "{$seqnum}"></CHICKENROW>
                   <xsl:call-template name="emptyRows">
                        <xsl:with-param name="seqnum" select="$seqnum + 1"/>
                        <xsl:with-param name="endSeqnum" select="$endSeqnum"/>
                   </xsl:call-template>
              </xsl:if>
         </xsl:template>
    </xsl:stylesheet>
    =======================================================
    INPUT XML:
    =======================================================
    <COWS>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>1</SEQNUM>
              <CHICKEN>ACMI2</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>2</SEQNUM>
              <CHICKEN>ALTE</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>3</SEQNUM>
              <CHICKEN>ANRO2</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>4</SEQNUM>
              <CHICKEN>ARCO5</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>5</SEQNUM>
              <CHICKEN>ARFR4</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>6</SEQNUM>
              <CHICKEN>ARTRV</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>7</SEQNUM>
              <CHICKEN>ASMO7</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>8</SEQNUM>
              <CHICKEN>CAGE2</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>9</SEQNUM>
              <CHICKEN>COUM</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>10</SEQNUM>
              <CHICKEN>ERIOG</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>11</SEQNUM>
              <CHICKEN>FEID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>12</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>13</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>14</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>15</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>16</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>17</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>18</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
         <COW>
              <KEY1>1</KEY1>
              <SEQNUM>19</SEQNUM>
              <CHICKEN>LEPID</CHICKEN>
         </COW>
    </COWS>

    ... or maybe they're not bugs at all, but if they're not, they're at least a difference in implementation from MSXML and Xalan. Do I misunderstand the XPath/XSL I'm using here? Is Oracle's interpretation equally valid?

  • Handling Namspaces in XSLT xpaths...

    Hi,
       I'm trying to generate the SOAP envelope using XSLT mapping. The source message to my mapping program, contains two fields:
      a. username
      b. pwd
    But they come in with attached namespaces like ns1. How do I specify the xpath to get the data from them?
    Regards,
    Harsh

    Hi Harsh,
    -me again -
    put the namespace declaration into the stylesheet element. like
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns1="namespace1">
    Now you can select with
    <xsl:value-of select="//ns1:a.username"/>
    Regards,
    Udo

  • Xslt node recursion

    have the following xml
    <level levelID="00" checked="false">
         <director>Jeff</director>
         <level levelID="11" checked="false">
              <director>John</director>
              <level levelID="22" checked="false">
                   <director>Bob</director>
                   <client levelID="33" checked="false">
                        <manager/>
                   </client>
                   <client levelID="44" checked="false">
                        <manager/>
                   </client>
              </level>
              <level levelID="55" checked="false">
                   <director>Rick</director>
                   <client levelID="66" checked="false">
                        <manager>Joe</manager>
                   </client>
              </level>
              <level levelID="77" checked="false">
                   <director>Alex</director>
                   <client levelID="88" checked="false">
                        <manager/>
                   </client>
              </level>
              <level levelID="99" checked="false">
                   <director>Brian</director>
                   <client levelID="0101" checked="false">
                        <manager>Ricky</manager>
                   </client>
              </level>
             </level>I was wondering if someone would have some sample recursive xslt code that would allow me to visit all level elements.
    Thank you for your time

    If so, is your input file is xml file ? If the file is not an xml file , then you need to do content conversion in the sender file adapter. Now question is , file is always a flat structure. So if you want to convert your non xml input file(i.e coma separated etc) into xml file in your file adapter into the deeply nested structure as you mentioned, it is difficult . I mean to say content conversion will not give you the structure more than 2 levels...
    <i><i>Can we loop through a recursive source structure via Java Mapping? Have you done something like that?</i></i>
    >>>Yes .Source structure is flat message structure...for a file it does not matter having deeply nested structure..
    Regards,
    Moorthy

  • XSLT Xpath question

    Hello all,
    I am kind of a newbie to the xpath sort of translation.
    I am curious on how to:
    Grab the last element with data from the input side of my xsl ?
    I appreciate any help on this.
    Jaden

    I guess I should explain what I am trying to accomplish :)
    I am trying to map an inbound 856 thru the xsl transformation.
    in the pack loop is the delivery detail id. under that are several item loops.
    My issue is that the Item Loop has the serial number where the Pack loop has the delivery detail. I need to copy the deliver detail id for each of the items for the output side of my transformation.
    I use the code /ns1:Transaction-856/ns1:Loop-HL/ns1:Segment-LIN/ns1:Element-234_1[last()]
    But i get only the first number in my output?
    Ty in advance
    Jaden

  • How to get a value from the previous element (XSLT/XPATH gurus ahoy!)

    Hi All,
    I am building an RTF template for a "letter of reference"-report. Sometimes there are several rows in the data, that need to be printed as one. This is due to consecutive temporary contracts, which will be printed out as one period of service.
    Here's a simplified data example to illustrate the problem.
    <ROW>
    <START_DATE>01-01-1980</START_DATE>
    <END_DATE>01-01-1988</END_DATE>
    </ROW>
    <ROW>
    <START_DATE>01-01-1988</START_DATE>
    <END_DATE>01-01-1990</END_DATE>
    </ROW>
    <ROW>
    <START_DATE>01-01-2000</START_DATE>
    <END_DATE>01-01-2005</END_DATE>
    </ROW>
    With the data above, I should print two lines:
    01-01-1980 - 01-01-1990
    01-01-2000 - 01-01-2005
    I need to compare START_DATE of an element (except for the first one) with the END_DATE of the previous element, to find out whether to print the END_DATE for that element or not. How can I get that value from the previous element?
    Thanks & Regards, Matilda

    use this to get the following End_date
    <?following-sibling::../END_DATE?>
    Try this
    <?for-each:/ROOT/ROW?>
    ==================
    Current StartDate <?START_DATE?>
    Current End Date <?END_DATE?>
    Next Start Date <?following-sibling::ROW/END_DATE?>
    Previous End Date <?preceding-sibling::ROW[1]/END_DATE?>
    ================
    <?end for-each?>
    o/p
    ==================
    Current StartDate 01-01-1980
    Current End Date 01-01-1988
    Next Start Date 01-01-1990
    Previous End Date
    ================
    ==================
    Current StartDate 01-01-1988
    Current End Date 01-01-1990
    Next Start Date 01-01-2005
    Previous End Date 01-01-1988
    ================
    ==================
    Current StartDate 01-01-2000
    Current End Date 01-01-2005
    Next Start Date
    Previous End Date 01

  • Xslt/xpath: count preceding elements which starts-with 'S'

    Hi everybody,
    I got the following XML:
    <?xml version="1.0" encoding="UTF-8"?>
    <ROOT>
         <A1>
              <FOO>1</FOO>
         </A1>
         <A1>
              <FOO>2</FOO>
         </A1>
         <B1>
              <FOO>3</FOO>
         </B1>
         <A1>
              <FOO>4</FOO>
         </A1>
    </ROOT>
    I want wo count all preceding Elements of each 3
    How has the experssion has to look?
    count(/ROOT/A1/FOO/preceding::[starts-with(.,'A')])
    DOES not work
    Any suggestions?
    Regards Mario
    Edited by: Mario Müller on Sep 12, 2008 2:23 AM

    Hi Mario,
    What are you using to test xsl expressions?
    I am using XSL Tester, all sugestions that i gave you retrieve a solution. Therefore, this solution will depend from XML tree. For instance if you have something like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <ROOT>
         <A1>
              <FOO>1</FOO>
              <FOO>5</FOO>
                            <A1000>
                                  <FOO>46</FOO>
                           <FOO>400</FOO>
                            </A1000>
              <FOO>300</FOO>
         </A1>
         <A2>
              <FOO>2</FOO>
              <FO>6</FO>
         </A2>
         <B1>
              <FOO>3</FOO>
         </B1>
         <A1>
              <FOO>4</FOO>
              <FO>7</FO>
         </A1>
    </ROOT>
    Using this XSL:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">
                <Result>
                   ---- Expression ----
              </Result>
         </xsl:template>
    </xsl:stylesheet>
    Results using the expressions that i gave you, will be:
    1.1
    <xsl:value-of select="count(//FOO[1][starts-with(name(parent::node()),'A')])"/>
    <?xml version="1.0" encoding="UTF-16"?>
         <Result>7</Result>
    1.2
    <xsl:value-of select="count(//FOO[1][starts-with(name(parent::node()),'A')])"/>
    <?xml version="1.0" encoding="UTF-16"?>
        <Result>4</Result>
    2.1
    <xsl:value-of select="count(/ROOT/*/FOO[starts-with(name(parent::node()),'A')])"/>
    <?xml version="1.0" encoding="UTF-16"?>
      <Result>5</Result>
    2.2
    <xsl:value-of select="count(/ROOT/*/FOO[1][starts-with(name(parent::node()),'A')])"/>
    <?xml version="1.0" encoding="UTF-16"?>
        <Result>3</Result>
    I think the last one, fits your solution. Give me more hints, maybe i can help you.
    Best regards,
    Pedro Pereira

  • XSLT recursion changed direction from JDK1.4 to JDK1.5?

    We make use of XSLT template recursion, and when we tried to test our code with JDK 1.5, the recursion "changed direction". I believe some sort of optimization is taking place that's inappropriately switching around the order or something.
    Here's a test case:
    test-data.xml:
    <?xml version="1.0" encoding="utf-8"?>
    <rating>3</rating>test-temp.xml:
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet
        version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
    <html>
    <body>
    <xsl:call-template name="showRating">
    <xsl:with-param name="num" select="'1'"/>
    </xsl:call-template>
    </body>
    </html>
    </xsl:template>
    <!-- SHOW RATED STARS -->
    <xsl:template name="showRating">
       <xsl:param name="num"/>
        <xsl:if test="$num <= rating">
        <img border="0" src="yellow_star.gif" valign="absmiddle"/>
        </xsl:if>
        <xsl:if test="$num > rating">
        <img border="0" src="white_star.gif" valign="absmiddle"/>
        </xsl:if>
    <xsl:if test="$num <= '4'">
    <xsl:text>
    </xsl:text>  <!-- CRLF -->
    <xsl:call-template name="showRating">
    <xsl:with-param name="num" select="$num + 1" />
    </xsl:call-template>
    </xsl:if>
    </xsl:template>
    </xsl:stylesheet>testxslt.java:
    import java.io.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    public class testxslt {
      public static void main(String[] args) {
        try {
          new testxslt();
        catch(Throwable t) {
          System.err.println(t + ": " + t.getMessage());
          t.printStackTrace();
      private testxslt() throws Exception {
        String stylesheet = readFile("test-temp.xml");
        String data = readFile("test-data.xml");
        String out = transform(stylesheet, data);
        System.out.println(out);
      private String readFile(String filename) throws IOException {
        StringBuffer out = new StringBuffer();
        Reader r = new FileReader(filename);
        int count;
        char buf[] = new char[1024];
        while((count = r.read(buf)) > 0)
          out.append(buf, 0, count);
        r.close();
        return out.toString();
      private String transform(String stylesheet, String data) throws Exception {
        ByteArrayOutputStream resultStream = new ByteArrayOutputStream();
        StreamResult transStreamResult = new StreamResult(resultStream);
        Source xmlData = new StreamSource(new StringReader(data));
        StreamSource styleSource = new StreamSource(new StringReader(stylesheet));
        TransformerFactory tf = TransformerFactory.newInstance();
        Templates t = tf.newTemplates(styleSource);
        Transformer trans = t.newTransformer();
        trans.transform(xmlData, transStreamResult);
        return resultStream.toString();
    }If you run it with jdk1.4, the yellow stars will (correctly) print first. If you run it with JDK 1.5, the white stars will print first.
    WTF?

    More info: I downloaded xalan from xml.apache.org, and by adding xalan.jar to the classpath, I can get JDK1.5 to output the stars in the right order. So this appears to be some issue having directly to do with the XSLTC transformer.

  • XPath and XQuery

    Hi all,
    What's the difference between the XPath and XQuery, can XPath has better performance than XQuery?
    Regards,
    Jane

    shree wrote:
    1.Can you differentiate these XSLT, XPath and XQuery.XSL stands for EXtensible Stylesheet Language, and is a style sheet language for XML documents. XSLT stands for XSL Transformations.
    XQuery is to XML what SQL is to database tables. XQuery was designed to query XML data.
    XPath is used to navigate through elements and attributes in an XML document. XPath is a major element in W3C's XSLT standard - and XQuery and XPointer are both built on XPath expressions.
    http://www.w3schools.com/xsl/default.asp
    http://www.w3schools.com/xquery/default.asp
    http://www.w3schools.com/xpath/default.asp
    Cheers,
    Vlad

  • Client side paging with jstl or xslt

    Is there any way to provide client side paging with jstl or xslt/xpath. I have a jsp page with a limited amount of data, say less than 30 rows of data. I want to display 10 rows at a time. The data is returned to the page in xml format and I am currently using xslt to display the data (currently displays all rows on the page). I am looking for a way to update my xpath variables so I can provide paging capabilities. Is there any way to get the information from the request from the jsp to the xpath variables? Or does anyone have any other suggestions for implementing client side paging using either xslst - xpath or jstl? Thanks Vic.

    I am loading the entire xml stream in the client and formatting using xslt. I only want to initially display 10 rows. I would like to implement client side paging. Is there any way to communicate with the xpath variables? Javascript?

  • ANN: XML Parser for Java v2.0.2.6

    The v2.0.2.6 of the XML Parser for Java is now available for download. The following features and bug fixes are included:
    Changes:
    Conformance to the XSLT/XPATH October REC.
    New API in XSLStylesheet class:
    removeParam(String param)
    resetParams()
    Bug fixes:
    Bug #1111423: OutOfMemory exception, if multiple calls made to document()
    Bug #1101028: Unexpected character error in DTD parsing document using Docbook DTD
    Bug #1101021: #default not supported in exclude-result-prefixes
    Bug #1099830: Extra characters inserted into output using the XML Parser
    Bug #1099663: HTML output does not allow only doctype-public to be specified
    Bug #1099536: HTML output does not disable escaping for script, style unless lowercase
    Bug #1098738: ArrayOutOfBoundsException xsl:if test="not(@a)'"
    Bug #1095047: XSLProcessor NPE'S on named templates with non-empty namespaces
    Bug #1094971: XSLStylesheet needs methods for removing parameters
    Bug #1092351: Using valueof() shuffles order of elements in my source document
    Bug #1086663: xsl:sort data-type attribute can now be a namespace-prefixed name
    Bug #1086661: xsl:version attribute now required on literal result element
    Bug #1064692: Default xml-serialization should use empty-element syntax
    Bug #1064689: Current() function doesn't work correctly
    This is the sixth production patch release for v2.
    Oracle XML Team http://technet.oracle.com
    Oracle Technology Network
    null

    The link has been fixed. You will go to the v2 download page
    now. Sorry for the inconvience.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Renilton Oliveira (guest) wrote:
    : I didn't find the file for version 2.0.0.0 as well.
    : Renilton
    : Andrei Filimonov (guest) wrote:
    : : I tried to download XML Parser for Java v2 it seems that
    only
    : v
    : : 1.0.1.4 is available. Could you please give an exact URL for
    : v2
    : : download?
    : : Andrei Filimonov
    : : Oracle XML Team wrote:
    : : : The Oracle XML v2 parser is now available for download
    here
    : as
    : : : an early beta release and is written in Java. It features
    : an
    : : : improved architecture over the Oracle XML v1 parser and
    has
    : : : shown better performance on small to large XML documents.
    : It
    : : : will also be able to format the XML document according to
    a
    : : : stylesheet, having integrated an XSLT processor.
    : : : Version 2 of the XML Parser for Java, besides
    incorporating
    : an
    : : : XSLT processor, has been re-architected from version 1.
    This
    : : has
    : : : resulted in a number of changes to the class names
    : especially
    : : : those that support Namespaces. See v2changes.txt and
    : the .diff
    : : : difference files in the sample directory.
    : : : Oracle XML Team
    : : : http://technet.oracle.com
    : : : Oracle Technology Network
    null

  • ANN: XML Parser for Java v2.0.2.5

    The v2.0.2.5 of the XML Parser for Java is now available for
    download. The following features and bug fixes are included:
    Conformance to the XSLT/XPATH October PR.
    Support for internationalized error messages has been added. The
    locale can be set using setLocale(java.util.Locale) function in
    XSLProcessor, SAXParser, and DOMParser.
    New APIs in XMLNode class:
    value-of(String pattern)
    selectNodes(String pattern)
    selectSingleNode(String pattern)
    selectSingleNode(String pattern, NSResolver ns)
    New API in XSLStylesheet class
    setParam(String param, String value)
    Bug fixes:
    Bug #957465: Missing a way to set stylesheet-level param-
    variables
    Bug #962290: selectNodes() improvements
    Bug #1033472: Html output prints empty elements for non-empty
    elements
    Bug #1040717: Character entity for greater that in html output
    style
    Bug #1046003: Bug is parsing text nodes larger than 16K
    Bug #1051671: 'xsl:namespace-alias' not supported
    Bug #1052387: Disable-output-escaping doesn't flush while
    printing
    Bug #1053273: 'xsl:message' terminate attribute not supported
    Bug #1058004: No access to media-type and encoding on xsl:output
    Bug #1058008: xsl:version attribute not copied to result
    Bug #1061159: Exclude-result-prefixes not supported
    Bug #1067965: Bug in Non-validating parser while reading QNames
    in DTD
    This is the fifth production patch release for v2.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

    The link has been fixed. You will go to the v2 download page
    now. Sorry for the inconvience.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Renilton Oliveira (guest) wrote:
    : I didn't find the file for version 2.0.0.0 as well.
    : Renilton
    : Andrei Filimonov (guest) wrote:
    : : I tried to download XML Parser for Java v2 it seems that
    only
    : v
    : : 1.0.1.4 is available. Could you please give an exact URL for
    : v2
    : : download?
    : : Andrei Filimonov
    : : Oracle XML Team wrote:
    : : : The Oracle XML v2 parser is now available for download
    here
    : as
    : : : an early beta release and is written in Java. It features
    : an
    : : : improved architecture over the Oracle XML v1 parser and
    has
    : : : shown better performance on small to large XML documents.
    : It
    : : : will also be able to format the XML document according to
    a
    : : : stylesheet, having integrated an XSLT processor.
    : : : Version 2 of the XML Parser for Java, besides
    incorporating
    : an
    : : : XSLT processor, has been re-architected from version 1.
    This
    : : has
    : : : resulted in a number of changes to the class names
    : especially
    : : : those that support Namespaces. See v2changes.txt and
    : the .diff
    : : : difference files in the sample directory.
    : : : Oracle XML Team
    : : : http://technet.oracle.com
    : : : Oracle Technology Network
    null

  • ANN: Oracle XML Parser for Java v2.0.2

    The new version of the Oracle XML Parser for Java v2 is
    available for download and has the following features and
    changes:
    1. Conformance to the XSLT/XPATH August WD.
    Note that there are several changes between April99 XSLT draft
    and the August99 XSLT/Xpath draft and these changes have been
    implemented in the XSL Processor. The XSL Processor has been
    modified to accept XPath syntax for expressions and patterns.
    Stylesheets might have to be modified to be conformant to the
    August XSLT/XPath draft before they can be used with this
    release.
    Some of the changes between April draft and the August draft
    are:
    a. Expressions in the stylesheet must match the XPath
    production Expr.
    b. Some of the attribute names and element names in XSL
    namespace have changed.
    c. Some new functions have been added to XPath CORE function
    library.
    Please refer to the August XSLT/XPath draft for more details.
    This is the first production release for v2.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    null

    The link has been fixed. You will go to the v2 download page
    now. Sorry for the inconvience.
    Oracle XML Team
    http://technet.oracle.com
    Oracle Technology Network
    Renilton Oliveira (guest) wrote:
    : I didn't find the file for version 2.0.0.0 as well.
    : Renilton
    : Andrei Filimonov (guest) wrote:
    : : I tried to download XML Parser for Java v2 it seems that
    only
    : v
    : : 1.0.1.4 is available. Could you please give an exact URL for
    : v2
    : : download?
    : : Andrei Filimonov
    : : Oracle XML Team wrote:
    : : : The Oracle XML v2 parser is now available for download
    here
    : as
    : : : an early beta release and is written in Java. It features
    : an
    : : : improved architecture over the Oracle XML v1 parser and
    has
    : : : shown better performance on small to large XML documents.
    : It
    : : : will also be able to format the XML document according to
    a
    : : : stylesheet, having integrated an XSLT processor.
    : : : Version 2 of the XML Parser for Java, besides
    incorporating
    : an
    : : : XSLT processor, has been re-architected from version 1.
    This
    : : has
    : : : resulted in a number of changes to the class names
    : especially
    : : : those that support Namespaces. See v2changes.txt and
    : the .diff
    : : : difference files in the sample directory.
    : : : Oracle XML Team
    : : : http://technet.oracle.com
    : : : Oracle Technology Network
    null

  • Help: to get XML child data in faster way?

    Dear all,
    With the following xml file, how can I use xslt by Java to get any <data> child element's string content. For example, to get "ee ff gg hh" in <Data name="inputs2">ee ff gg hh</Data> [this is in <Info Date="03-05-2003"> branch]?
    I want to get it in a quick way, so I do not want to get it by DOM. The question is what is the best way to get it in Java? Is it possible by SAX combined with XSLT (XPATH) - with Java Code?
    <?xml version="1.0" encoding="UTF-8"?>
    <Customer>
        <Infos>
            <Info Date="03-05-2003" >
                <Inputs name="John">
                    <Data name="inputs1">a b c d</Data>
                    <Data name="inputs2">aa bb cc dd</Data>
                    <Data name="inputsn">an bn cn dn</Data>
                </Inputs>
            </Info>
            <Info Date="03-05-2003" >
                <Inputs name="Mike">
                    <Data name="inputs1">e f g h</Data>
                    <Data name="inputs2">ee ff gg hh</Data>
                    <Data name="inputsn">en fn gn hn</Data>
                </Inputs>
            </Info>
        </Infos>
    </Customer>Thanks
    - John

    The problem is my file could be very large in size,
    and if "load the whole thing into memory", it will
    throw out of memory exception. So the best thing would
    be dynamically load it if possible.
    SAX and XSLT actually can do some help, since whenever
    it finds my requested node, it can stop processing -
    but the problem here is: it has to reparse the XML
    file from the beginning every time to find the
    requested node - a very time-consuming job...
    Any better solution?how about using sax to parse the file, and temporarily insert the records into a DB? You could then use SQL to do your queries.
    parsing/inserting might take awhile; but a properly tuned DB (and the java.sql.statement.addBatch()) will minimize this - probably down to the order of a DOM parse.
    Other solutions:
    - regex and perl/python on the XML file
    - splitting the big XML file into little XML files (one file per <Inputs> tag maybe?) and dealing with an individual node at a time
    - parsing the file as SAX and caching the info you need (i.e. parse it once and cache the values); then look them up afterwards

Maybe you are looking for

  • Getting the same text more than once

    I keep getting the same numerous texts more than once from my friends and one of my friends even said that they were getting my texts out of order. Is it my phone or the network?

  • .mov to iPod -- how long to convert?

    I imported a short movie into Quicktime Pro v7, then saved it as a .mov file. When I exported it to "iPod" format, it took 3 hours. The original file is 150MB and 11 minutes long. Is this export time correct? If not, what are some of the things I can

  • BP balances

    Just a simple question: when you enter an outgoing payment on account it records the entry on the BP record, then you print the check and confirm it. Why does the system still show the BP balance for the outgoing payment and also shows it on the agin

  • Displaying html 4 with css2 support in swing

    is it possible to do (for free) jeditorpane doesnt do it properly

  • What this function does: AIB3_EVALUATE_ODS_ASSIGN in PS/IM?

    Dear all, I'm investigating for the possible cause of data lost in transit in PS/IM area. The suspect currently is an update rule involving a function AIB3_EVALUATE_ODS_ASSIGN, as based on its E_SUBRC output value a record is skipped or not. Though I