Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
| Search | Today's Posts | Mark Forums Read
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT 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 June 14th, 2006, 04:37 AM
Authorized User
Points: 108, Level: 2
Points: 108, Level: 2 Points: 108, Level: 2 Points: 108, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2006
Location: , , United Kingdom.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default Include & Output (possibly) Help

I've tried to be fancy (probably my downfall !) and include some vb scripts to give me a day of the week, which seem to work perfectly, but appears to show additional data after labels.

This is what I have:

Code:
<?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vbdate="urn:schemas-xmlpitstop-com:vbdate">

    <xsl:include href="script.VBDayOfWeek.xsl"/>

    <xsl:output version="1.0" encoding="UTF-8" omit-xml-declaration="no" method="xml" indent="yes"/>


Which as I say does return the day of the week where needed, but it's now converted the following output:
Code:
        <RateGuaranteed Currency="USD">279.00</RateGuaranteed>
into:
Code:
        <RateGuaranteed Currency="USD" xmlns:vbdate="urn:schemas-xmlpitstop-com:vbdate">279.00</RateGuaranteed>
Do I need to put something in the relevant templates to suppress it, or is it something within the xsl:output ?

as always thanks in advance

  #2 (permalink)  
Old June 14th, 2006, 05:19 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

Use exclude-result-prefixes="vbdate" on the xsl:stylesheet element.

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
  #3 (permalink)  
Old June 14th, 2006, 05:28 AM
Authorized User
Points: 108, Level: 2
Points: 108, Level: 2 Points: 108, Level: 2 Points: 108, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2006
Location: , , United Kingdom.
Posts: 24
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Many thanks (again) Michael



Similar Threads
Thread Thread Starter Forum Replies Last Post
Increment By Range & Output Solver Result ibrahim ahmad Excel VBA 0 April 30th, 2008 10:16 PM
Need "&" and "<!-- -->" in the output sunrain XSLT 2 January 19th, 2007 05:29 PM
difference between include file & include virtual crmpicco Classic ASP Basics 2 January 23rd, 2006 11:50 AM
input in html & output in jsp Befekadu Pro JSP 0 March 28th, 2005 10:28 AM
Querystring output - possibly machine.config prob. stuartharper .NET Web Services 1 August 8th, 2003 08:43 AM





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