Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0
This is the forum to discuss the Wrox book XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition by Michael Kay; ISBN: 9780470192740
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
  #1 (permalink)  
Old August 5th, 2008, 02:08 PM
Authorized User
 
Join Date: Jun 2006
Location: Enschede, , Netherlands.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default Result of Transformation

Struggling with hello.xml, transformed by hello.xsl
this can be remarked:

Asking for the source of the result (either IE7 or FF3) the XML is shown!?
In FF3 with Firebug-plugin one may inspect elements and doing so the transformation is nicely seen.

Using Saxionb like this
Code:
c:\web\xampp\htdocs\xml\saxonb>java -classpath . -jar saxon9.jar -t -s:hello.xml hello.xsl 
java -classpath . -jar saxon9.jar -t -s:hello.xml hello.xsl 
Saxon 9.1.0.1J from Saxonica
Java version 1.6.0_07
Warning: at xsl:stylesheet on line 2 column 80 of hello.xsl:
  Running an XSLT 1.0 stylesheet with an XSLT 2.0 processor
....
Shows the HTML code too (nice!)

Where did the Warning come from? In the orginal has this line:
Code:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
replacing 1.0 by 2.o the Warning vanisches :D
  #2 (permalink)  
Old August 5th, 2008, 02:58 PM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

IE has a plug-in to allow you to view the generated HTML, but I've forgotten where you get it from.

>Where did the Warning come from?

The W3C WG decided that because there is a very small risk that an XSLT 2.0 processor might produce different results from a 1.0 stylesheet than a 1.0 processor would produce, the processor must give you a warning if you do this. In my view, however, it's not a particularly good idea - those who know about the version differences don't need the warning, and those who don't get unnecessarily alarmed. Also, it tends to encourage people to do what you have done - change the version to 2.0 - which is far more likely to introduce minor incompatibilities if you don't know what you are doing, because in cases where there are differences, a 2.0 processor will use the version="1.0" setting as a signal to behave in a backwards-compatible way.

Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference
  #3 (permalink)  
Old August 6th, 2008, 09:06 AM
Authorized User
 
Join Date: Jun 2006
Location: Enschede, , Netherlands.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

OK, understood.
Only one idea: the Warning is a little bit strange: couldn't it be more precise? column 80 (end of line I think) says what? Version Warning would be more understandable, wouldn't it?
Because I did not get yet other warnings, ...

  #4 (permalink)  
Old August 6th, 2008, 09:41 AM
mhkay's Avatar
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

Sorry, I can't see how the message could be more precise. It says it's a warning, it says where it's encountered in the source, it says that the (possible) problem is that you are running an XSLT 1.0 stylesheet using an XSLT 2.0 processor. What more is there to say (short of giving a list of all the things that could conceivably go wrong when you run a 1.0 stylesheet using a 2.0 processor)?

Michael Kay
http://www.saxonica.com/
Author, XSLT 2.0 and XPath 2.0 Programmer's Reference
  #5 (permalink)  
Old August 6th, 2008, 10:57 AM
Authorized User
 
Join Date: Jun 2006
Location: Enschede, , Netherlands.
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You are right, so sorry .... I did not read the second line, but focussed on column 80
Please forgive me. Will try to do better



Similar Threads
Thread Thread Starter Forum Replies Last Post
help on xslt transformation li72 XSLT 2 March 4th, 2008 10:14 AM
GridView and SQL More than one result = one result DarkForce ASP.NET 2.0 Basics 0 July 20th, 2007 04:29 AM
using transformation KieshaJ310 ASP.NET 2.0 Basics 2 June 6th, 2007 05:56 AM
Transformation Question realgone_ SQL Server DTS 1 March 3rd, 2005 10:22 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.