[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Call-Template confusion

Subject: Call-Template confusion
From: Emitchell154@xxxxxx
Date: Sun, 1 Oct 2000 15:07:28 EDT
Call-Template confusion
Hello all
I'm trying to transform an input XML doc to an internal format my company 
uses, and I have a couple of questions.  Thanks in advance for any help-I 
want this to turn out well; I'm told my company had a disastrous introduction 
to XML, and they are now suspicious of all things XML.
First off
The input XML docs arrive with a document type declaration, so  to transform 
them (we don't care about their validity-that will have been done before they 
reach us by the client), must the processor (xt) have access to the dtd?  (It 
is a 97 page monster, and I'm afraid that validating against it (or whatever 
xt might need it for) will slow transformations, and give the anti-XML 
element in the company ammunition) .  If it must, is there a way to write a 
micro-dtd, just a few lines, which more-or-less says "Everything is 
permitted" and give it the same name as the monster?
Finally
The result must have selected nodes converted to text, in a specific position 
on its proper line (e.g., the text in node <xx> must be output to line 2, 
spaces 14-50), but the text in the node may or may not occupy all the alloted 
space (although if it goes over, that's Somebody Elses Problem). 
I thought maybe <xsl:text> instructions containing the proper number of 
spaces as well as an <xsl:value-of />, but Mike Kay's book put a damper on 
that (my shortcomings are all genetic; the book rocks :>)   ) .
Could a call-template be written that took two parameters (a string, and a 
number) return the string with empty spaces appended to the end so that it 
occupied the number of spaces specified by the number parameter?  How would 
such a template be written in XSLT, or is there a better way altogether?
BRIEF EXAMPLE
<a>123456789 </a>  <!--<a> must occupy spaces 5 through 15, inclusive, on 
line x-->
1234567      <!--b must occupy spaces 17 through 50, inclusive, also on line 
x-->

needs to be (hyphens represent blank spaces, numbering begins at 0):

-----123456789---1234567--------------------------

Thanks again
Edmund Mitchell
edmund_mitchell@xxxxxxxxxxx



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.