XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Rick BomarSubject: Adaper question???
Author: Rick Bomar
Date: 26 Apr 2005 09:49 AM
Originally Posted: 26 Apr 2005 09:48 AM
How do I add a Trailer Region which is a count of the total number of records? This row will vary at which line number it could be at each time a new file is created, depending on how many records are in the file. When I created a Trailer Region, it seemed to always end up on the row I created it on when it was created in the adapter. All records after that are messed up. ie- if the region was created on row 100 one time and I created a new file with 150 rows, the Trailer Region would still break on row 100. I need this region to be a floating region and always appear at the end of the file. Is this something I need to do in my Stylesheet?<br> I tried that already but since it is not defined in the adapter, ie- no fields or region, it did not work. If this needs to be done in my xls, what would be the command? Thanks !<br>

Ivan PedruzziSubject: Adaper question???
Author: Ivan Pedruzzi
Date: 26 Apr 2005 11:08 AM

Use the following XSLT

<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<xsl:for-each select="HC_DATA/HEADER">
<xsl:copy-of select="NAME | PHONE | STREET | CITY | STATE | ZIP | EMAIL"/>
<xsl:for-each select="HC_DATA/RECORDS">
<xsl:copy-of select="RECORD_ID/following-sibling::*"/>
<xsl:variable name="mask" select="''"/> <!-- if you need padding use for example '0000000' -->
<xsl:variable name="r-count" select="count(HC_DATA/RECORDS)"/>
<xsl:variable name="padding" select="substring($mask, 1, (string-length($mask) - string-length($r-count)) )"/>
<xsl:value-of select= "concat($padding, $r-count)"/>

Tony LavinioSubject: Adaper question???
Author: Tony Lavinio
Date: 27 Apr 2005 11:07 AM
If you are using Convert-to-XML, you don't want to use Regions. What you want to do is use the regular-expression matching ability. You need to create a node and pattern that matches only the summary row. For example, if you summary row never contains a comma, you can select on that. If you post a copy of your input XML, we can demonstrate how for you. Or you can mail it to stylus-field-report (at) stylusstudio.com

Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.