473,698 Members | 2,615 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Different XPath query behaviors when using xslCompiledTran sform

When I use xslCompiledTran sform() or xslCompiledTran sform(false) I find that
the XPath queries in my select query attributes do not recognize any
attributes inthe xml document. But when I enable debugging
-xslCompiledTran sform(true)- everything works as it should.
for example:
<Root>
<test attr1="avalue" />
<test attr1="anotherv alue" />
</Root>
doing a
<xsl:for-each select="/Root/test">
<xsl:sort select="@attr1" />
</xsl:for-each >
will sort using xslCompiledTran sform(true) but not
xslCompiledTran sform(false). The problem is the select="@attr1" returns
attribute values in debugging mode but not in run mode. I am using Visual
Studio 2005 with .NET Framework 2.0 SP1 for an IIS web solution on Windows XP
SP2.
Aug 26 '08 #1
1 1527
"wejiv" <we***@discussi ons.microsoft.c omwrote in message
news:12******** *************** ***********@mic rosoft.com...
When I use xslCompiledTran sform() or xslCompiledTran sform(false) I find
that
the XPath queries in my select query attributes do not recognize any
attributes inthe xml document. But when I enable debugging
-xslCompiledTran sform(true)- everything works as it should.
for example:
<Root>
<test attr1="avalue" />
<test attr1="anotherv alue" />
</Root>
doing a
<xsl:for-each select="/Root/test">
<xsl:sort select="@attr1" />
</xsl:for-each >
will sort using xslCompiledTran sform(true) but not
xslCompiledTran sform(false). The problem is the select="@attr1" returns
attribute values in debugging mode but not in run mode. I am using Visual
Studio 2005 with .NET Framework 2.0 SP1 for an IIS web solution on Windows
XP
SP2.
Please don't multipost.

I've answered in the XSL group.
--
Anthony Jones - MVP ASP/ASP.NET
Aug 26 '08 #2

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

Similar topics

1
6822
by: bdinmstig | last post by:
I refined my attempt a little further, and the following code does seem to work, however it has 2 major problems: 1. Very limited support for XPath features Basic paths are supported for elements, attributes, ".", and "..", plus also the "" predicate format is supported - however, only one predicate per path step is supported, and expr must be a relative path. 2. Poor performance
8
7580
by: Terry P | last post by:
Are there any tools (java classes, tag libraries) which can translate xpath statements into a SQL query? Given an xpath query which has a predicate that filters node values or attributes, I want help constructing the Where clause of a SQL statement that will mirror the expressions and functions contained in the predicate. Such a tool may require an XML to DB mapping or it would need to make assumptions about the structure of the...
2
2879
by: ree32 | last post by:
When I import an xml document in Visual studio and Genereate as schema from it, and create a dataset from it, it adds this line into to the root element of my xml file - "xmlns="http://tempuri.org/nameOfRoot.xsd" I have no idea what its pointing to & what is tempuri.org? So when this tag is in my xml tag my xpath query never works. But when I delete it work fine.
3
1458
by: Chua Wen Ching | last post by:
Hi everyone, I am not that good in xml terms and coding in c#. To be honest. ok, just imagine, i had this xml file. <xml> <language>C#</language> <comments>cool language</comments> <desc />
4
2266
by: Karine Bosch | last post by:
Hi, My xml document uses different namespaces: <x:root xmlns:x="x:ns:meta/"> <element1 xmlns:adam="http://ns.alfaprint.be/"> </root> This gives problems when using an XPath query. I already created 2 namespace managers
1
2415
by: Sergey Dubinets | last post by:
In effort to prioritize our goals we composed the list of random features each of them may add value to set of XSLT tools offered from Microsoft. 1. XSLTc (Compiler for XSLT stylesheets, that generates .NET assemblies) 2. Performance improvements in the XslCompiledTransform
3
4975
by: Jason Mobarak | last post by:
Hello -- I'm attempting to get a handle on how to do xpath queries with System.Xml -- so far the biggest hurdle has been how to deal with a default namespace. If I use the test xml: <?xml version="1.0" encoding="utf-8" ?> <thing xmlns="urn:thing-schema-v1"> <foo>foo thing</foo> <bar>bar thing</bar>
0
1239
by: bryhi | last post by:
Here is the code you can past in your console application to see the differences. I need to know how to get this to work correctly. #pragma warning disable // because we are using a depricated object static void Main(string args) { /* * There are two problems: * 1. The characters (CRLF) are not being output by the new object. * 2. Anything not in xml tags causes a crlf to be inserted. */
1
2124
by: yawnmoth | last post by:
<?php $content = ' <a> <d> <b> <c/><c/> </b> </d> <b> <c/><c/><c/>
0
8612
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
8905
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6532
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
5869
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
4373
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
4625
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3053
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
2342
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2008
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.