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/A099C37789AACEE386256E35007338E6?OpenDocument
http://digital.ni.com/public.nsf/allkb/3A7F1402B2A1CE7686256E93007E66C0?OpenDocument
Mr.O
Applications Engineer
National Instruments
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?
AdeWe have ora:node-set()
Use http://www.oracle.com/XSL/Transform/java
as the namespace URI for the "ora" prefix. -
Using JavaScript to set value of Spry validated text field
Why can't the value of a text field be set using JavaScript
when it's validated using the Spry validation widget.
Example (this works):
<select name="birthdate_month" id="birthdate_month"
onChange="document.getElementById('birthdate').value = 'test';">
<option>1</option>
<option>2</option>
</select>
<input type="text" name="birthdate" id="birthdate"
value="">
Example (this doesnt work):
<select name="birthdate_month" id="birthdate_month"
onChange="document.getElementById('birthdate').value = 'test';">
<option>1</option>
<option>2</option>
</select>
<span id="birthdate">
<input type="text" name="birthdate" id="birthdate"
value="">
<span class="textfieldRequiredMsg">please enter your
birthday</span>
</span>
<script type="text/javascript">
<!--
var birthdate = new
Spry.Widget.ValidationTextField("birthdate", "none");
//-->
</script>
Is there a way to change the value of a Spry validated text
field using JavaScript?
Thanks.Why can't the value of a text field be set using JavaScript
when it's validated using the Spry validation widget.
Example (this works):
<select name="birthdate_month" id="birthdate_month"
onChange="document.getElementById('birthdate').value = 'test';">
<option>1</option>
<option>2</option>
</select>
<input type="text" name="birthdate" id="birthdate"
value="">
Example (this doesnt work):
<select name="birthdate_month" id="birthdate_month"
onChange="document.getElementById('birthdate').value = 'test';">
<option>1</option>
<option>2</option>
</select>
<span id="birthdate">
<input type="text" name="birthdate" id="birthdate"
value="">
<span class="textfieldRequiredMsg">please enter your
birthday</span>
</span>
<script type="text/javascript">
<!--
var birthdate = new
Spry.Widget.ValidationTextField("birthdate", "none");
//-->
</script>
Is there a way to change the value of a Spry validated text
field using JavaScript?
Thanks. -
Using jquery to user only allow numbers in single line text field with infopath 2010 form
Please provide me right solution for the same.
I have already used below script, but this is not working
<script type="text/javascript">
$(document).ready(function () {
var input = document.getElementById('ctl00_m_g_85322960_0783_4665_a3e7_41708ddd7c1c_FormControl0_V1_I1_T3');
input.onkeydown = function(e) {
//var k = e.which;
/* numeric inputs can come from the keypad or the numeric row at the top */
if (e.shiftKey || e.ctrlKey || e.altKey) {
e.preventDefault();
} else {
var key = e.keyCode;
if (!((key == 8) || (key == 46) || (key >= 35 && key <= 40) || (key >= 48 && key <= 57) || (key >= 96 && key <= 105))) {
e.preventDefault();
</script>Hi,
As Matt mentioned, it is OK to change field type to number if you want only number can be entered in the textbox. If you want to treat them as string in the backend, you can use CONVERT function to change its data type in the code.
If you insist on jquery, try to change condition paremeter in IF to:
key >
31 &&
(key <
47 ||
key > 57)
The order number of numbers (0 ~ 9) is from 48 to 57 (in Dec).
Miles LI TechNet Community Support -
Is it better to use Invoke nodes or property nodes to set/get control values?
I have a series of VI's that run in parallel, each to manage different functions- pumping, sensing, a fluid flow model, an experiment generator/runner.
These need to exchange data, which I am currently doing using invoke nodes (that are all in subVIs), using methods "Set control value" and "Get control value". I find that every now and then (perhaps 1% of the time) the data isn't exchanged correctly and therefore the system doesn't work. I can imagine how "set" could go wrong if they happen simultaneously, and can devise ways of preventing this. However, the "Get" method suffers from the same problem. This is a major problem, because I want to leave it running for several hours.
I could in
principle achieve the same thing using property nodes and find myself wondering if this might be more reliable. But I don't want to change over only to find it makes no difference!
Can anyone advise?You can use some kind of syncronization such as queues, occurances, or notifiers but I think the easiest way would be to create and action engine. This was only one action can execute at a time avoiding a "race condition". Possibly a write action and a read action might help. You also can add queues or notifiers into this concept. hope this helps.
BJD1613
Lead Test Tools Development Engineer
Philips Respironics
Certified LV Architect / Instructor -
Error "Members, tuples or sets must use the same hierarchies in the function" in MDX
the following MDX returns error: "Members, tuples or sets must use the same hierarchies in the function"
WITH
MEMBER [Measures].[Prev Year] AS
[Measures].[returns],
PARALLELPERIOD
[Exec Date].[Year].Levels('Year'),
1,
[Exec Date].[Year].CURRENTMEMBER
MEMBER [Measures].[Prev Month] AS
[Measures].[returns],
PARALLELPERIOD
[Exec Date].[Month Num].Levels('Month Num'),
1,
[Exec Date].[Month Num].CURRENTMEMBER
MEMBER [Measures].[Prev Day] AS
[Measures].[returns],
PARALLELPERIOD
[Exec Date].[Day].Levels('Day'),
1,
[Exec Date].[Day].CURRENTMEMBER
SELECT NON EMPTY { StrToMember("@ExecDateLevel"), [Measures].[returns] } ON COLUMNS, NON EMPTY { ([Employees].[Company].[Company].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM (
SELECT (
STRTOSET(@ExecDateHierarchy, CONSTRAINED)
) ON COLUMNS FROM [cbSales]) WHERE ( IIF( STRTOSET(@ExecDateHierarchy, CONSTRAINED).Count = 1, STRTOSET(@ExecDateHierarchy, CONSTRAINED), [Exec Date].[Hierarchy].currentmember ) ) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
and when I replace "StrToMember(@ExecDateLevel)" with
StrToMember("[Measures].[Prev Month]") the MDX is compiled correctly.
what is the problem?
How can I solve that?Hi Breceive,
In your scenario, the issue is caused by that you select dimension members and measures on the same axis without a crossjoin.
SELECT NON EMPTY { StrToMember("@ExecDateLevel"), [Measures].[returns] } ON COLUMNS
To avoid this issue, you can use the query below.
WITH
MEMBER [Measures].[Prev Year] AS
[Measures].[returns],
PARALLELPERIOD
[Exec Date].[Year].Levels('Year'),
1,
[Exec Date].[Year].CURRENTMEMBER
MEMBER [Measures].[Prev Month] AS
[Measures].[returns],
PARALLELPERIOD
[Exec Date].[Month Num].Levels('Month Num'),
1,
[Exec Date].[Month Num].CURRENTMEMBER
MEMBER [Measures].[Prev Day] AS
[Measures].[returns],
PARALLELPERIOD
[Exec Date].[Day].Levels('Day'),
1,
[Exec Date].[Day].CURRENTMEMBER
SELECT NON EMPTY { StrToMember("@ExecDateLevel")*[Measures].[returns] } ON COLUMNS, NON EMPTY { ([Employees].[Company].[Company].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM (
SELECT (
STRTOSET(@ExecDateHierarchy, CONSTRAINED)
) ON COLUMNS FROM [cbSales]) WHERE ( IIF( STRTOSET(@ExecDateHierarchy, CONSTRAINED).Count = 1, STRTOSET(@ExecDateHierarchy, CONSTRAINED), [Exec Date].[Hierarchy].currentmember ) ) CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
Here is a similar thread for you reference.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/3c21d9a8-640d-4dde-bc76-08d1fcbb3a31/multiple-dimension-query?forum=sqlanalysisservices
Regards,
Charlie Liao
TechNet Community Support -
Using an own function in a select how can i set that the function run once?
Hi
Using an own function in a select how can i set that the function run once, not in every row?
Please help me
Thanks
ViktorSomething like this ?
SQL> select * from dept;
DEPTNO DNAME LOC
10 ACCOUNTING NEW YORK
20 RESEARCH DALLAS
30 SALES CHICAGO
40 OPERATIONS BOSTON
SQL> create or replace function ret_name (deptnum in number) return varchar2
2 is
3 name varchar2(50);
4 begin
5 select dname into name
6 from dept
7 where deptno=deptnum;
8 return name;
9 exception
10 when no_data_found then
11 return('Not existent deptno');
12* end;
SQL> /
Function created.
SQL> select deptno, decode(rownum,1,ret_name(deptno),null) dname from dept;
DEPTNO DNAME
10 ACCOUNTING
20
30
40
SQL> -
Hi all, i am newbie
i want to knwo how can i convert following source message to target message
using standard node functions?
Source Message
<devices>
<device>
<sn>123</sn>
<city>Berlin</city>
</device>
<device>
<sn>345</sn>
<city>Berlin</city>
</device>
<device>
<sn>777</sn>
<city>Bonn</city>
</device>
</devices
Target Message
<cities>
<city>
<name>Berlin</name>
<devices>
<sn>123</sn>
<sn>345</sn>
</devices>
</city>
<city>
<name>Bonn</name>
<devices>
<sn>777</sn>
</devices>
</city>
</cities>Hi,
Since you are newbie i would suggest follow the stefan's blog. use formatbyexample for your requirement.
New functions in the Graphical Mapping Tool XI ... | SCN
Please read the comments also you will get more idea
Regards,
Muniyappan. -
Mapping issues while using MapwithDefault Node function for Idoc
Hi Experts,
We are facing issues while trying to generate nodes at reciver side even though it does not exist at sender side.
we are using the matmas05 and we want the nodes E1marcm and e1mardm to generated at target structure.
the structure is like this
Matmas05
idoc
E1maram
segment
E1marcm
segment
msgfn
.....other fields
E1mardm (can be many segments)
segment
lgort
..other fields
E1mpgdm
segment
...e1mpgdm fields
the mapping has been done like:
e1marcm -mapwithdefault-e1marcm
constant -segment
werks-mapwithdefault-werks
other fields(one to one mapping)
e1mardm-mapwith default-e1mardm
lgort-mapwithdefault(value 1000)-lgort
other fields -one to one mapping
now the problem we are facing is when e1mardm is not existing in source structure the values from the other node of e1mardm(which exists) are getting overwritten into it.
we want only the lgort to be 1000 and the segment should populate at target side.
like
e1mardm
segment
lgort value 1000
Could you please assist in solving this issue and give your valuable suggestions as how could we handle it.
Thanks and regards,
jyotiU will achieve this using UDF function. Map the below Like.
e1mardm-mapwith default(Value Constant)-e1mardm
lgort (A) ---
e1mardm-mapwith default(Value Exit)u2014(EqualsS) (B)- (UDF1)- lgort
Constant(Value Exit)---
Constant(Value 1000)(C)---
Other one to one mapping fields also you should use one more UDF.
Other one to one fields (A) ---
e1mardm-mapwith default(Value Exit)u2014(EqualsS) (B) - (UDF2)- Target
Constant(Value Exit)---
UDF1:
Argument A,B,C and select queue.
//write your code here
int j = 0;
for(int i=0;i<a.length;i++)
if (b[j].equals("true"))
result.addValue(c[0]);
i--;
result.addValue(ResultList.CC);
else
result.addValue(a<i>);
j++;
UDF2:
Argument A,B and select queue.
//write your code here
int j = 0;
for(int i=0;i<a.length;i++)
if (b[j].equals("true"))
i--;
result.addValue(ResultList.CC);
else
result.addValue(a<i>);
j++; -
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 withThis 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. -
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?
BrianThis 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.
-
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 Tysonselect count(*) from purchaseorder
where existsNode(object_value,'/PurchaseOrder[User="SBELL"]') = 1
/ -
Xml result fragment to node-set
I wrote a stylesheet that transforms data into a html table and dedupes all consecutive identical elements.
The consecutive duplicates obviously depend on the sorting of the data, which is also a variable of the stylesheet.
I ended up using the msxml:node-set function that allowed me to convert a sorted result fragment (in a variable) back into a node-set. Is there anything equivalent in oracle's parser? or a workarround to pre-sort the data?
I would like to avoid multi-step transforms if possible...
thanks for any help.
nullnever mind... found ora:node-set()
must have been blind I guess....
null -
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,
JonathanHi,
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
Maybe you are looking for
-
Extended Podcasts not showing all images
I just noticed that the extended podcasts that I have, which include a number of images, only show the first image during the playing of the podcast. On the iPhone or iPod Touch, the same podcasts will sequence through the added images as necessary.
-
Can't seem to merge Reminders with Calendar in Yosemite
Merging Calendar & Reminders? Is a thread I started. I thought it might solve the problem. It did create an ICS file, but Calendar doesn't understand it! Any clues how to proceed?
-
Is there a way for Labview to take control of a file that is already in use
Is there a way in LabView to programatically take control of a file in use by another process? I wish to write data to files that may be opened by another process, this data is time sensitive and acquired continuously so having my process wait until
-
MXI-3 to PXI bridge under Windows XP problems
Hi, I have installed a MXI-3 card in my PC's PCI bus, and have it connected to a 8330 MXI3 card in a PXI1000B crate. Also in this crate are various I/O cards (6533, 6713, GPIB etc). When I booted the XP machine first time, it detected new hardware an
-
Will this Samsung SSD be as fast as apples default Flashdrive if mounted in 2013 mac pro.
Hello, Will replacing the default SSD of a late 2013 Mac pro with this Samsung SSD decrease performance speed? I plan on getting this one to get more space, it will be just as fast as the default ssd, right? SSD Samsung SSD 840 EVO Series 120GB 2.5