XSL extension/  node set

In my XSL stylesheet , I am using XSL component to call external program (in my case it is a Java program). The called java method returns a List. (a list of Strings like "A", "B", "C").
The following XSL element
<xsl:value-of select="xalan:nodeset(javaExtension:getResult())" />
returns [A,B,C],
where javaExtension - is the namespace prefix
getResult is a method in my Java program.
But I wish to return this list of values in my output xml like
<value> A <value>
<value> B <value>
<value> C <value>
is there any xalan-nodeset function available to get this result. Your help is greatly appreciated.
Thanks
r

I had no idea, so I searched Google for xalan:nodeset. Before long I came across this example straight from the Xalan site:
http://xml.apache.org/xalan-c/extensionslib.html#nodeset

Similar Messages

  • Oracle xsl parser equivalent to msxsl:node-set()?

    Hello
    I am looking for an equivalent to the msxsl:node-set() that I can use with the Oracle xsl parser.
    Any sugestions?
    Ade

    We have ora:node-set()
    Use http://www.oracle.com/XSL/Transform/java
    as the namespace URI for the "ora" prefix.

  • Oracle XSL extensions functions

    Where can I find a list (and doc) of all the Oracle XSL extensions functions like ora:node-set?
    TIA
    Didier

    Please try this link:
    http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96621/adx05xsj.htm#1023311

  • Xslt error: the expression does not evaluate to a node-set

    hi guys - i'm really down because i cannot find / understand my xsl error and i have to finish my work very very soon
    the error message (by using xalan to create from the xml file my html output) is the following:
    xslt error: the expression does not evaluate to a node-set
    and the code fragement is:
    <xsl:template name="getNext">
    <xsl:param name="currentKnoten" />
    <xsl:for-each select="$currentKnoten"> //error is in this line
    </xsl:for-each>
    </xsl:template>please... help me....

    ok thanks!!! this saved me some time ;-)
    now i go back to the origin problem... my main idea is the following xsl code... may u can see here the problem with the node site.. but i think u need the xml file or?
    however this is my relevant xsl code:
    <xsl:template match="DATA">
              <xsl:element name="process">
                   <xsl:attribute name="name">
                        <xsl:value-of select="@name" />
                   </xsl:attribute>
                   <xsl:apply-templates select="INSTANCE"/>
              </xsl:element>
         </xsl:template>
    <xsl:template match="INSTANCE[@class='Data']">
              <xsl:element name="node">
                   <xsl:attribute name="name">
                        <xsl:value-of select="@name" />
                   </xsl:attribute>
                   <xsl:attribute name="class">
                        <xsl:value-of select="@class" />
                   </xsl:attribute>
                   <xsl:call-template name="copyAttributes" />
                   <xsl:variable name="nextNodes">
                        <xsl:value-of select="key('keyGetData', key('keyFrom', @name)/../TO/@instance)" />
                   </xsl:variable>
                   <xsl:call-template name="getNext">
                        <xsl:with-param name="currentNode" select="$nextNodes" />
                   </xsl:call-template>
              </xsl:element>
    </xsl:template>     
    <xsl:template name="getNext">
              <xsl:param name="currentNode"/>
              <xsl:for-each select="$currentNode">
                   <xsl:element name="node">
                        <xsl:attribute name="name"><xsl:value-of select="@name"/></xsl:attribute>
                        <xsl:attribute name="class"><xsl:value-of select="@class"/></xsl:attribute>
                        <xsl:variable name="nextNodes">
                             <xsl:value-of select="key('keyGetData', key('keyFrom', @name)/../TO/@instance)"/>
                        </xsl:variable>
                        <xsl:call-template name="copyAttributes"/>
                        <xsl:call-template name="getNext">
                             <xsl:with-param name="currentNode" select="$nextNodes"/>
                        </xsl:call-template>
                   </xsl:element>
              </xsl:for-each>
         </xsl:template>
         <xsl:template name="copyAttributes">
              <xsl:for-each select="descendant::*">
                   <xsl:copy>
                        <xsl:copy-of select="@*|node()"/>
                   </xsl:copy>
              </xsl:for-each>
         </xsl:template>
         <xsl:template match="@*|node()">
              <xsl:apply-templates/>
         </xsl:template>

  • Document() not returning a useable node set?

    If I open another document during a transform, I can dump out the file using
    xsl:message, but can't match any tags in the loaded file. If I replace the Sun
    implementation with the apache implementation of xalan with -Xbootclasspath/p,
    the code runs fine.
    Example fragment:
    <xsl:variable name="user_type">
    <xsl:for-each select="//include/@file_name">
    <xsl:variable name="xmlFile">
    <xsl:value-of select="$xml_dir"/>/<xsl:value-of select="."/>
    </xsl:variable>
    <xsl:for-each select="document($xmlFile)" >
    <xsl:value-of select="key('type_def_key',$datatype)//datatype" />
    </xsl:for-each>
    </xsl:for-each>
    </xsl:variable>
    <xsl:message>
    User type <xsl:value-of select="$user_type" /> for <xsl:value-of select="$datatype" />
    </xsl:message>
    I believe the problem is with the document function not returning a useable
    node set , or all of the matches are going back to the original document rather
    than the one that was just open. With in the context of the new document
    select="." appears to work, but nothing else seems to.
    Output using Sun's xml implementation (JDK 5.0, 6.0 snapshot)
    User type for Gms_User_Id
    Output using the Apache xml implmentation (Xalan 2.6)
    User type numeric for Gms_User_Id
    The code and xml files are the same in both cases, just changed the runtime
    class path with

    This is behaving as designed.
    Configuring a view object so expect certain entity subtypes does not automatically restrict the rows it queries. If the view object's query returns any row that has a discriminator value that does not match the design-time configured entity subtypes expected, it is not added to the result rowset.
    If you have limited the number of fetched rows to 1, and if that row had a discriminator attribute value that does not match that/those of the expected entity subtypes, then the single row returned by the query will not be added to the result rowset. The result is that the row set has zero rows in it.

  • Xsl:selecting nodes in ascending order

    Hi,
    Could anybody please answer this query.
    I have the following xml
    <Root>
    <Child>
         <number>1</number>
    </Child>
    <Child>
         <number>3</number>
    </Child>
    <Child>
         <number>4</number>
    </Child>
    <Child>
         <number>6</number>
    </Child>
    <Child>
         <number>7</number>
    </Child>
    <Child>
         <number>10</number>
    </Child>
    </Root>
    Now from xsl i need to select Child nodes in ascending order based on the <number> tag within <Child> node.
    Also at max there will be 10 child nodes,As the loop goes and retrives the nodes,I need to know which nodes
    have gone missing as i need to do some thing if a node is missing {For example in the above xml Child nodes
    with number 2,5,8,9 are missing.
    Is there any way I can do this?
    Thanks and Regards,
    Deepak                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    There's <xsl:sort> if you want to process a node set in ascending sequence. And there's the preceding-sibling axis if you want to look at a previous sibling node. You would want to test whether the preceding sibling's number element was one less than the current node's number element.

  • Document(object, node-set)

    Using xsql 1.0.4.1, I'm having some trouble using the document(object, node-set) function defined in the XSLT 1.0 recommendation, sect 12.1:
    http://www.w3.org/TR/xslt#function-document
    I have a tag in my source xml document which contains a reference to another xml document. I want to construct an XPath expression for this other xml document. The path to the other xml document is specified relative to the source document.
    I'm doing something like this:
    Source Document:
    <blah>
    <some-tag redirect="answer.xml" />
    </blah>XSL:
    <xsl:template match="blah/some-tag">
    <xsl:variable name="redir" select="document(@redirect, / )" />
    <xsl:apply-templates select="$redir//somepath" />
    </xsl:template>
    ...However, Oracle XSLT always comes back with the following error:
    XSL-1013: Error in expression 'document(@redirect, / )'.I also get this error if I try
    document(@redirect, document(''))which is given as an example on pg 446 of Steve's book (but not what I want, since it resolves relative to the stylesheet).
    document(@redirect)works fine, but again is not what I want.
    Am I doing something wrong?
    Brian

    This is Oracle Bug# 1722555, hopefully which will be fixed in the 9.0.1.0.0 release. Currently the two-argument version of the document() function is not recognized properly.

  • Converting xmlstring into a node-set

    Hi,
    Is there any xsl function which could take an xml string and convert into a node-set?
    Or could any function be written to achieve this kind of result?
    Thanks.

    Hi,
    Seems no one understands my need in my post yet. Let me elaborate my requirement a little more...
    Actually in my case, I used a variable to refer to a node set (in my actual implementation the conditions in the bracket [] are much much more complicated ), e.g.
    <?variable:rows;”/ROWSET/ROW[SALARY>1000]”?>
    And since the report involves a complex layout printed on pre-print forms which needs me to put the fields very precisely. I cannot use the For Each method but to extract the rows one by one, likes the following:
    <?$rows[1]/ENAME?>
    <?$rows[2]/ENAME?>
    and put them on various position on the RTF Template.
    So far so good, until I realized that the $rows node set is needed to be sorted according to ENAME.
    Currently I can build a sorted list from $rows into another variable $sorted_rows as follows:
    <xsl:variable name="sorted_rows"><xsl:for-each select="$rows"><xsl:sort select="ENAME"/><xsl:copy-of select="."/></xsl:for-each></xsl:variable>
    But in $sorted_rows, it contains only one item which is the xml fragment of the sorted data, but not a node set.
    So my question is, is there any way to convert this xml fragment into a node set so I can use the following to extract the fields?
    <?$sorted_rows[1]/ENAME?>
    <?$sorted_rows[2]/ENAME?>
    Hope anyone can share with my some solution to this.
    Thanks in advance,
    Jonathan

  • Casting a result-tree-fragment into a node set

    Hi,
    Is there anything in BI Publisher that converts a result-tree-fragment into a node set, which resembles the node-set function in as in the following link? http://www.exslt.org/exsl/functions/node-set/
    Thanks,
    Jonathan

    Hi,
    Seems no one understands my need in my post yet. Let me elaborate my requirement a little more...
    Actually in my case, I used a variable to refer to a node set (in my actual implementation the conditions in the bracket [] are much much more complicated ), e.g.
    <?variable:rows;”/ROWSET/ROW[SALARY>1000]”?>
    And since the report involves a complex layout printed on pre-print forms which needs me to put the fields very precisely. I cannot use the For Each method but to extract the rows one by one, likes the following:
    <?$rows[1]/ENAME?>
    <?$rows[2]/ENAME?>
    and put them on various position on the RTF Template.
    So far so good, until I realized that the $rows node set is needed to be sorted according to ENAME.
    Currently I can build a sorted list from $rows into another variable $sorted_rows as follows:
    <xsl:variable name="sorted_rows"><xsl:for-each select="$rows"><xsl:sort select="ENAME"/><xsl:copy-of select="."/></xsl:for-each></xsl:variable>
    But in $sorted_rows, it contains only one item which is the xml fragment of the sorted data, but not a node set.
    So my question is, is there any way to convert this xml fragment into a node set so I can use the following to extract the fields?
    <?$sorted_rows[1]/ENAME?>
    <?$sorted_rows[2]/ENAME?>
    Hope anyone can share with my some solution to this.
    Thanks in advance,
    Jonathan

  • XSL select node type

    If I have an xsl:template select-expression that can select both say <html:h1> and <html:h2>, is there a way in XSL of inspecting the elements of the resulting node-set and distinguishing which ones were <h1> and which were <h2>?
    Probably blindingly obvious ... but not to me ;-(

    I think the function is localname()? Or maybe local-name()?
    That returns the name of the currentNode...maybe.
    I have no xsl testy framework thing here since I haven't needed it for the current job, so you may want to take this with a pinch of salt.
    So...if I'm right...something like:
    <xsl:if test="local-name() = 'h1'">
    do stuff.
    </xsl:if>May need namespaces and the like, but I think that's the general structure.
    ...I hate trying to write this stuff "blind"...

  • Using msxsl:node-set as a function to a field in InfoPath 2010

    I have been trying to query a node set (from a web service - managed metadata web service infact) without success.  I received a GetTermSetsResult that I am trying to parse as an xml using msxsl:node-set().    Currently I am just throwing
    up messages about the expression result in a form load rule.   I just get empty node sets.  Note that I have even tried querying the xml string directly like in the examples below but the behavior is always the same.
    some examples of what I have tried that give empty nodesets:
     msxsl:node-set('<Container><TermStore>...'))/Container/TermStore
     msxsl:node-set('<Container><TermStore>...'))/Container
     msxsl:node-set('<Container><TermStore>...'))/*
    These give the following results:
     count(msxsl:node-set('<Container><TermStore>...')))  ---> reports "1"
    count(msxsl:node-set('<test>...</test><test>...</test>')))  ---> reports "1" when it should say "2"
    msxsl:node-set('<Container><TermStore>...'))/node()   ---> returns what looks like the entire xml document
    Ultimately I want to populate a listbox with managed metadata (taxonomy/folksonomy) terms in a "codeless" way.  I know it is a no brainer to use code behind but where I work they like to see minimum code.

    Hello mohrr,
    The PCIe-6321 doesn't have internal triggers you you have to export the signals to a PFI line ant the use the signal as external trigger.
    If you are not very familiar about how to do that, here you can find two documents that can give you an idea about how does it work.
    http://digital.ni.com/public.nsf/allkb/A099C37789A​ACEE386256E35007338E6?OpenDocument
    http://digital.ni.com/public.nsf/allkb/3A7F1402B2A​1CE7686256E93007E66C0?OpenDocument
    Mr.O
    Applications Engineer
    National Instruments

  • Error in Invoke Node-Set Control Value

    I've a trouble with a VI: the error cluster warns ERR(7) when I try to pass the output of the "FLATTEN TO STRING" function to an Invoke Node-Set Control Value.
    In the file attachments there's the upmentioned VI. Thank you
    Attachments:
    Cambia_i_valori_di_default.vi ‏147 KB

    Error 7 is file not found. I would think that this error is generated by one of your Open VI References and not any of the Set Control Values. Check your paths and verify that they're correct. Also, you haven't included two subVIs or the VIs that you're trying to modify so it's impossible for anyone to try and recreate your problem. Save them into an LLB and attach that if you still have problems and want some help.

  • Php with mysqli, mbstring and xsl extensions

    I don't understand why php isn't build with mysqli and mbstring extensions since mysql4 is installed and there are a lot of languages that need multibytes strings. Here is a PKGBUILD that enable them. I also added xsl extension to use xsl files with php.
    # $Id: PKGBUILD,v 1.51 2004/12/16 22:03:19 judd Exp $
    # Maintainer: dorphell <[email protected]>
    # Contributor: Benoit Chesneau <[email protected]>
    pkgname=php
    pkgver=5.0.3
    pkgrel=2
    pkgdesc="A high-level scripting language"
    url="http://www.php.net"
    backup=(etc/php.ini)
    depends=('openssl' 'libjpeg' 'freetype2' 'libpng' 'pam'
    'gdbm' 'libxml2' 'openldap' 'ncurses' 'curl' 'libxslt')
    makedepends=('apache' 'mysql' 'imap' 'postgresql' 'bzip2' 'smtp-server'
    'gd' 'fam' 'sqlite3' 'unixodbc')
    source=(http://www.php.net/distributions/$pkgname-$pkgver.tar.gz php.ini)
    md5sums=('bf89557056ce34d502e20e24071616c7' 'd5b9b37fbb746f0967d795763106735a')
    build() {
    cd $startdir/src/$pkgname-$pkgver
    ./configure --with-apxs2 --prefix=/usr --sysconfdir=/etc
    --with-layout=PHP
    --with-ttf --enable-mailparse --with-config-file-scan-dir=/etc
    --enable-bcmath=shared --enable-calendar=shared --enable-ftp=shared
    --enable-gd-native-ttf --enable-magic-quotes --enable-posix=shared
    --enable-session --enable-shared --enable-shmop=shared --with-imap
    --with-imap-ssl --with-ncurses --with-readline --with-sqlite=shared
    --enable-sysvsem=shared --enable-sysvshm=shared --enable-track-vars
    --enable-trans-sid --enable-safe-mode --enable-sockets=shared
    --enable-xml --with-bz2=shared --with-curl --with-mime-magic
    --with-unixODBC=shared
    --enable-dba --without-db2 --without-db3 --with-inifile --with-flatfile
    --with-gdbm --with-freetype-dir=/usr --with-gd=shared --enable-exif
    --with-jpeg-dir=/usr --with-mysql=/usr --with-mysqli=/usr/bin/mysql_config
    --with-ldap=shared
    --with-mysql-sock=/tmp/mysql.sock --with-openssl --with-gettext
    --with-pear=/usr/share/pear --with-dom --with-dom-xslt
    --with-pgsql=shared --with-pgsql-sock=/tmp/pgsql.sock
    --with-png-dir=/usr --with-regex=php --with-zlib --with-fam=shared
    --with-xsl
    --enable-mbstring=all --enable-mbregex
    # fixes a build error in sqlite support
    ln -s main/php_config.h ./config.h
    make || return 1
    mkdir -p $startdir/pkg/usr/lib/apache
    # cp config_vars.mk config_vars.old
    # sed "s|^INSTALL_IT.*$|INSTALL_IT = apxs -i -a -S LIBEXECDIR=$startdir/pkg/usr/lib/apache -n php4 libs/libphp4.so|" config_vars.old >config_vars.mk
    sed -i "s|-i -a -n php5|-i -n php5|g" Makefile
    make INSTALL_ROOT=$startdir/pkg EXTENSION_DIR=/usr/lib/php install
    cp ../php.ini $startdir/pkg/etc

    i suggest filing a feature request through the bug tracker.
    As for why such features may not be compiled in is that whoever maintains the package may have never had the need to have such features in php or experienced any issue because of it. You will experience this with many distros so I suggest not getting accusatory and simply request the feature through the proper channels.
    Each persons needs and experience are different and that is why developers write their code to encompass as many features as their users request.  How robust a package needs to be in arch is up to people like you giving the crucial feedback.
    (btw i don't see why your request would not be granted. I suggest the feature request though because i know the maintainer of the PHP package is not a frequent visitor to this forum but he will get your request if you make to the bug tracker)

  • XSL Extension Functions

    Is it possible to write our own xsl Extension Functions in Java using the oracle 9i xsl translator? If yes, how would I write the namespace to point to my class? I was able to do it with xalan, but unable so far with the oracle xslt. TIA.

    You can using XDK for Java

  • Node Set Expressions

    Does Oracle implement node set expressions like count( node set ) in it's xpath syntax? If so, can you give me an example indicating how the count( node set ) expression would be used? This function would be extremely useful when iterating through a node set.
    Kevin Tyson

    select count(*) from purchaseorder
    where existsNode(object_value,'/PurchaseOrder[User="SBELL"]') = 1
    /

Maybe you are looking for

  • App Store Genius only on iPhone (not desktop) ???

    Why is the genius feature for the app store not accessible from my laptop running itunes? you would think that this would be the other way around... usually the mobile device is missing some features of the desktop. all in all i like the new version

  • Ram all used, system sluggish, nothing open

    So it started after I upgraded to Leopard (clean install) and after my machine has been running for over a day or two, usually after using something flash intensive in safari but not always, Ill come back to my computer in the morning and my wired ra

  • How to change script time limits in FlashBuilder 4/ error #1502

    Hy guys i have a seriusly problem, and i hope that any one to help me. I'm a developer GIS, and i develop a Web Mapping Application with FlexViewer ArcGIS. I have a widget that call a model that i published in REST. When i run the widget i have error

  • How to install pjava onto ipaq 3650?

    Hi, I am a newbie and have looked many posts here. Everyone talked about his pjava running on ipaq, but still no one gives specific steps to do? First I don't know what's the difference between Sun's pjava and jeode. Second I don't know which softwar

  • Exporting playlists from iTunes - sometimes pathname is not included

    Sometimes when I export a playlist from iTunes, it does not include the pathname where the playlist is located on my external hard drive. I'm not certain, but I wonder if it is because the pathname is too long. In any case, anyone have suggestions ho