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
 
Old January 26th, 2005, 01:24 PM
Registered User
 
Join Date: Jan 2005
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Syntax and formatting Help

I have two probably easy questions :)

The first is - what is wrong with this syntax:
<Worksheet ss:Name="[substring('{Metadata/WorksheetName}_Hist',1,31)]">

This is a stylesheet for excel - I want to account for names that could go beyond the max length of 31.

This is the message I get:
XML ERROR in Workbook Setting
REASON: Bad Value
FILE: C:\DOCUME~1\bgunion\LOCALS~1\Temp\17.tmp
GROUP: Workbook
TAG: Worksheet
ATTRIB: Name
VALUE: [substring('Active_insAll_$$_Hist',1,31)]

The second question has to do with a documentation sheet. The sql code must be documented in the workbook. The code has indents and spaces like:

Update tblTriangle_Dollar
    SET Loantotal = a.loans
    FROM (
    SELECT Year(dateContract) Year, datepart(q,datecontract) MQ,
        sum(amtloan) Loans
        FROM loantable
        WHERE dateofdata = 'Sep 30 2004 12:00AM' ....

I can retrieve this code from the data and get it in to an xml file (with spaces) but when I open it in excel i get:

Update tblTriangle_Dollar SET Loantotal = a.loans
FROM (SELECT Year(dateContract) Year, datepart(q,datecontract) MQ,sum(amtloan) Loans FROM smolinski.tblMasterMonthlyData20040930 WHERE dateofdata = 'Sep 30 2004 12:00AM'

Without word-wrap it is one long string. I would like to keep the indents.
Currently the code is one cell (e.g. <code>my code<code/>) - In other word each line is not separate out. It is formatted the way i want it in text form - it just doesn't translate to excel.

Thanks!







Similar Threads
Thread Thread Starter Forum Replies Last Post
whats a good tool for auto-formatting SQL Syntax?? callagga SQL Language 1 August 29th, 2008 12:11 PM
Cell formatting Neal Excel VBA 0 May 9th, 2006 08:02 AM
Formatting syrex XSLT 2 November 5th, 2005 08:23 AM
formatting reports clueless_may Access VBA 1 May 14th, 2004 01:58 AM
Formatting Ben Access 3 February 28th, 2004 05:52 AM





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