473,657 Members | 2,624 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

xsl:value-of select doesn't like "($variable )" expressions; bug?

(.Net framework version 1.1.4322)

The following XSL test case is rejected by System.Xml.Xsl. XslTransform, with an XsltException: "($dummy)+0 is an invalid XPath expression." If you remove the parentheses then it is happy. This appears to be an error; see http://www.w3.org/TR/xpath#NT-Expr. The path through the grammar is quite long; if you start with the Expr rule, it (eventually) leads back to PrimaryExpr, which indicates that ($variable) is allowed.

http://www.w3.org/TR/xpath#NT-Expr
http://www.w3.org/TR/xpath#NT-OrExpr
http://www.w3.org/TR/xpath#NT-AndExpr
http://www.w3.org/TR/xpath#NT-EqualityExpr
http://www.w3.org/TR/xpath#NT-RelationalExpr
http://www.w3.org/TR/xpath#NT-AdditiveExpr
http://www.w3.org/TR/xpath#NT-MultiplicativeExpr
http://www.w3.org/TR/xpath#NT-UnaryExpr
http://www.w3.org/TR/xpath#NT-UnionExpr
http://www.w3.org/TR/xpath#NT-PathExpr
http://www.w3.org/TR/xpath#NT-FilterExpr
http://www.w3.org/TR/xpath#NT-PrimaryExpr
-- at this point we can choose parentheses "( Expr )" or VariableReferen ce:
http://www.w3.org/TR/xpath#NT-VariableReference
Is this fixed in a newer version of the framework? If so, where can I get the fix?

Thanks,
Alistair.
-------------------------------------------
test case (run it over any XML document; mine is just "<a/>")
-------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>

<xsl:variable name="dummy">
<xsl:value-of select="132"/>
</xsl:variable>

<xsl:template match="/">
<myitem>
<xsl:attribut e name="number">
<xsl:value-of select="($dummy )"/>
</xsl:attribute>
</myitem>
</xsl:template>

</xsl:stylesheet>

Nov 12 '05 #1
2 1881
Is there some reason I haven't received a response to this problem? Have I
violated some rule of newsgroup etiquette, or is my post malformed? According
to the MSDN subscriptions guide I have, I can post "unlimited .NET product
and technology questions ... and receive a guaranteed response from Microsoft
Support Professionals within two business days".
"Alistair Bayley" wrote:
(.Net framework version 1.1.4322)

The following XSL test case is rejected by System.Xml.Xsl. XslTransform, with an XsltException: "($dummy)+0 is an invalid XPath expression." If you remove the parentheses then it is happy. This appears to be an error; see http://www.w3.org/TR/xpath#NT-Expr. The path through the grammar is quite long; if you start with the Expr rule, it (eventually) leads back to PrimaryExpr, which indicates that ($variable) is allowed.

http://www.w3.org/TR/xpath#NT-Expr
http://www.w3.org/TR/xpath#NT-OrExpr
http://www.w3.org/TR/xpath#NT-AndExpr
http://www.w3.org/TR/xpath#NT-EqualityExpr
http://www.w3.org/TR/xpath#NT-RelationalExpr
http://www.w3.org/TR/xpath#NT-AdditiveExpr
http://www.w3.org/TR/xpath#NT-MultiplicativeExpr
http://www.w3.org/TR/xpath#NT-UnaryExpr
http://www.w3.org/TR/xpath#NT-UnionExpr
http://www.w3.org/TR/xpath#NT-PathExpr
http://www.w3.org/TR/xpath#NT-FilterExpr
http://www.w3.org/TR/xpath#NT-PrimaryExpr
-- at this point we can choose parentheses "( Expr )" or VariableReferen ce:
http://www.w3.org/TR/xpath#NT-VariableReference
Is this fixed in a newer version of the framework? If so, where can I get the fix?

Thanks,
Alistair.
-------------------------------------------
test case (run it over any XML document; mine is just "<a/>")
-------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="xml" indent="yes"/>

<xsl:variable name="dummy">
<xsl:value-of select="132"/>
</xsl:variable>

<xsl:template match="/">
<myitem>
<xsl:attribut e name="number">
<xsl:value-of select="($dummy )"/>
</xsl:attribute>
</myitem>
</xsl:template>

</xsl:stylesheet>

Nov 12 '05 #2
This is a bug which will be fixed in the next version of the .NET Framework.
Thanks for providing this bug report.

--
This posting is provided "AS IS" with no warranties, and confers no rights.

"Alistair Bayley" <Al************ @discussions.mi crosoft.com> wrote in
message news:7C******** *************** ***********@mic rosoft.com...
Is there some reason I haven't received a response to this problem? Have I
violated some rule of newsgroup etiquette, or is my post malformed? According to the MSDN subscriptions guide I have, I can post "unlimited .NET product
and technology questions ... and receive a guaranteed response from Microsoft Support Professionals within two business days".
"Alistair Bayley" wrote:
(.Net framework version 1.1.4322)

The following XSL test case is rejected by System.Xml.Xsl. XslTransform, with an XsltException: "($dummy)+0 is an invalid XPath expression." If you
remove the parentheses then it is happy. This appears to be an error; see
http://www.w3.org/TR/xpath#NT-Expr. The path through the grammar is quite
long; if you start with the Expr rule, it (eventually) leads back to
PrimaryExpr, which indicates that ($variable) is allowed.
http://www.w3.org/TR/xpath#NT-Expr
http://www.w3.org/TR/xpath#NT-OrExpr
http://www.w3.org/TR/xpath#NT-AndExpr
http://www.w3.org/TR/xpath#NT-EqualityExpr
http://www.w3.org/TR/xpath#NT-RelationalExpr
http://www.w3.org/TR/xpath#NT-AdditiveExpr
http://www.w3.org/TR/xpath#NT-MultiplicativeExpr
http://www.w3.org/TR/xpath#NT-UnaryExpr
http://www.w3.org/TR/xpath#NT-UnionExpr
http://www.w3.org/TR/xpath#NT-PathExpr
http://www.w3.org/TR/xpath#NT-FilterExpr
http://www.w3.org/TR/xpath#NT-PrimaryExpr
-- at this point we can choose parentheses "( Expr )" or VariableReferen ce: http://www.w3.org/TR/xpath#NT-VariableReference
Is this fixed in a newer version of the framework? If so, where can I get the fix?
Thanks,
Alistair.
-------------------------------------------
test case (run it over any XML document; mine is just "<a/>")
-------------------------------------------

<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes"/>

<xsl:variable name="dummy">
<xsl:value-of select="132"/>
</xsl:variable>

<xsl:template match="/">
<myitem>
<xsl:attribut e name="number">
<xsl:value-of select="($dummy )"/>
</xsl:attribute>
</myitem>
</xsl:template>

</xsl:stylesheet>

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
2276
by: neblackcat | last post by:
Would anyone like to comment on the following idea? I was just going to offer it as a new PEP until it was suggested that I post it here for comment & consideration against PEP 308. I'm far from being a "language internist" (on Python or anything else) so go easy on me if this is stupid - it just seemed quite elegant to me as a relative newbie in town :-) I also havent got a clue whether this would be easy or even possible
5
11500
by: malcolm | last post by:
Example, suppose you have these 2 tables (NOTE: My example is totally different, but I'm simply trying to setup the a simpler version, so excuse the bad design; not the point here) CarsSold { CarsSoldID int (primary key) MonthID int DealershipID int NumberCarsSold int
3
1321
by: Jemy | last post by:
Hi all, I need to do a keyword search against database table (MSSQL 2000) on particular field/column, say the keyword: "sql server 2000". The search should return without any order restrictions, so it might return result contain '2000' and 'sql' and 'server', or can return that contain 'server' only. appreciate any advice. thanks from Jemy.
3
7388
by: Colin Toal | last post by:
Hi all, I'm starting to learn XSLT - and have what I think is a very basic question: I have a stylesheet like this: <?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
8
3765
by: Penny | last post by:
Hi all, My browser throws this Select Case block back at me pointing out a syntax error on the line: 'Case < 251', between the word 'Case' and the '<' symbol. *************************** intWeightTotal = 550 Select Case intWeightTotal
3
2905
by: Cindy | last post by:
OK, I have the following table: create table citations_by_level ( aid smallint, wid smallint, v_level varchar(50), w_level varchar(50), x_level varchar(50), y_level varchar(50),
2
2479
by: Daniel | last post by:
how to make sure a xsl document has valid xsl syntax? i tried loading it into an xml document but that doesnt show syntax errors inside attributes such as "foo/bar" vs "bar\foo"
7
11433
by: mark | last post by:
Access 2000: I creating a report that has a record source built by the user who selects the WHERE values. An example is: SELECT * FROM CHARGELOG WHERE STDATE Between #10/27/2003# And #11/2/2003# And VehicleID='00000000' And BattID='LKO500HF'. I need to use the records returned to populate text boxes, but the data requires further manipulation. I attempting to use expressions in the control source
4
5167
by: Együd Csaba | last post by:
Hi All, I'd like to "compress" the following two filter expressions into one - assuming that it makes sense regarding query execution performance. .... where (adate LIKE "2004.01.10 __:30" or adate LIKE "2004.01.10 __:15") .... into something like this: .... where adate LIKE "2004.01.10 __:(30/15)" ...
7
14990
by: wk6pack | last post by:
Hi, How do I check datatable.select(filter) in the following: for each dtrow in datatable.select(filter) .... next I've also tried:
0
8427
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7355
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6178
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5649
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4334
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2749
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1975
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.