Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Search Forums
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Welcome to the p2p.wrox.com Forums.

You are currently viewing the section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Showing results 1 to 23 of 23
Search took 0.01 seconds.
Search: Posts Made By: baseliner
Forum: XSLT May 12th, 2012, 02:25 AM
Replies: 0
Views: 596
Posted By baseliner
Applying multiple character maps in succession

Hi - I'm trying to take an XML file, apply a transform that does a set of character-maps on it, then take the resulting XML file and apply a set of different character-maps on this file before it...
Forum: BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 September 14th, 2011, 07:33 PM
Replies: 2
Views: 1,138
Posted By baseliner
Thanks Michael for pointing me to that function.....

Thanks Michael for pointing me to that function.. I was able to do most of what I needed. Appreciate the help.
Forum: BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 August 25th, 2011, 06:15 PM
Replies: 2
Views: 1,138
Posted By baseliner
Computing date/day patterns

Hi,

Given a set of dates in XML format (see below for sample XML), I need to compute the following information:

- what day of the month it is, e.g. 1st, 2nd, .. , nth, last (this is an easy...
Forum: XSLT November 23rd, 2010, 09:31 PM
Replies: 8
Views: 8,147
Posted By baseliner
Thanks for the suggestions. Unfortunately both...

Thanks for the suggestions. Unfortunately both those approaches require some heavy code change since the code I showed above is only a small part of my larger XSLT which involves multiple files and...
Forum: XSLT November 23rd, 2010, 04:56 PM
Replies: 8
Views: 8,147
Posted By baseliner
Thinking about this some more, it appears that my...

Thinking about this some more, it appears that my problem would be solved if there is a way to invoke a stylesheet from within a stylesheet and assign the output of the invoked stylesheet (which...
Forum: XSLT November 23rd, 2010, 03:34 PM
Replies: 8
Views: 8,147
Posted By baseliner
To be more specific, I have code that looks like...

To be more specific, I have code that looks like the following:



My problem is that this code above when run, produces output that contains the newlines between the above lines. I don't want to...
Forum: XSLT November 23rd, 2010, 06:12 AM
Replies: 8
Views: 8,147
Posted By baseliner
Removing whitespace from "text" output

Hi - I have an XSLT stylesheet that I use to preprocess some XML data and convert it to text (non-XML) data that is used in another program. I'd like to remove the whitespace characters including...
Forum: XSLT April 12th, 2010, 02:06 AM
Replies: 4
Views: 2,565
Posted By baseliner
Thanks for the tips, Michael. I changed the...

Thanks for the tips, Michael. I changed the function to the one shown below (I removed all tokenize as this approach helped the most) and this improved performance by around 20%. The change from...
Forum: XSLT April 11th, 2010, 02:17 AM
Replies: 4
Views: 2,565
Posted By baseliner
I rewrote this function to avoid doing multiple...

I rewrote this function to avoid doing multiple tokenize's and avoid substring... not sure this is the best that can be done though:


<xsl:function name="lbs:formatDateISO" as="xs:date">...
Forum: XSLT April 10th, 2010, 10:42 PM
Replies: 4
Views: 2,565
Posted By baseliner
Optimizing function to convert string to ISO date

Hi - I have a function that I invoke repeatedly in my stylesheet to convert a string of the form 04/09/2010 or 4/09/2010 or 4/9/2010 or 04/9/2010 to the ISO format 2010-04-09. I ran a profiler on my...
Forum: XSLT December 7th, 2009, 04:47 PM
Replies: 6
Views: 7,365
Posted By baseliner
Right, I implemented that for another case but...

Right, I implemented that for another case but that would only work if exactly one parameter was optional.. so it appears for the multiple optional parameters case, I need to write multiple...
Forum: XSLT December 7th, 2009, 04:42 PM
Replies: 6
Views: 7,365
Posted By baseliner
So when I invoke the function, I still need to...

So when I invoke the function, I still need to pass 2 arguments as follows (assuming I want to invoke with one real argument for param2):

lbs:myfn('','blah')

If so, this would be quite...
Forum: XSLT December 7th, 2009, 04:34 PM
Replies: 6
Views: 7,365
Posted By baseliner
Functions with multiple optional parameters

I have a function that has two parameters.. I'd like to be able to call it with either one or both parameters.. is it possible to do this in XSLT 2.0 without having to resort to empty arguments in...
Forum: BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 December 4th, 2009, 09:28 PM
Replies: 5
Views: 1,652
Posted By baseliner
Thanks Michael, that's a great idea to convert to...

Thanks Michael, that's a great idea to convert to xs:date! This also helped me compute a date that's offset from a given date by a given duration, which was my next step.. very cool! :)
Forum: BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 December 4th, 2009, 06:17 AM
Replies: 5
Views: 1,652
Posted By baseliner
Aah, I see. I figured that using the number()...

Aah, I see. I figured that using the number() function to convert the string into a number within the function would ensure that the return value of the function would be an integer. Guess not. I...
Forum: BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 December 4th, 2009, 05:37 AM
Replies: 5
Views: 1,652
Posted By baseliner
Issue with comparing dates

Hi - I have a function that I've defined in XSLT that converts a date that looks like 1/4/2010 (Jan 4, 2010) into the ISO format 20100104. This is what my function looks like:

<xsl:function...
Forum: BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 July 29th, 2009, 11:34 AM
Replies: 8
Views: 15,532
Posted By baseliner
Michael and Sam - thanks a lot for your help! The...

Michael and Sam - thanks a lot for your help! The compiled transform was just what I needed and I have it all working now.

Michael - not sure I follow your suggestion of getting rid of the...
Forum: BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 July 28th, 2009, 12:26 PM
Replies: 8
Views: 15,532
Posted By baseliner
Thanks for pointing this out, Michael. I was...

Thanks for pointing this out, Michael. I was trying to avoid XSLT since I need to perform this logic multiple times in the for loop so I was trying to avoid the overhead associated with loading an...
Forum: BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 July 28th, 2009, 02:34 AM
Replies: 8
Views: 15,532
Posted By baseliner
Thanks Sam. As I mentioned, I was trying to...

Thanks Sam. As I mentioned, I was trying to exclude ALL D elements as a precursor to the end-goal of excluding based on a criterion (I think I can manage the additional predicates if I can get the...
Forum: BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 July 27th, 2009, 07:29 PM
Replies: 8
Views: 15,532
Posted By baseliner
Excluding elements in XPath

I'm trying to exclude certain elements using XPath within an ASP.NET C# application. My XML structure is as follows:


<A>
<B>
<C>
<D>
<D>
Forum: XSLT July 18th, 2009, 03:42 PM
Replies: 5
Views: 1,079
Posted By baseliner
Thank you so much Martin and Michael. There was...

Thank you so much Martin and Michael. There was no way I was going to figure this one out myself! I now see this third parameter for key() mentioned on page 378 of Michael's book.. :) Thanks again!
Forum: XSLT July 18th, 2009, 06:14 AM
Replies: 5
Views: 1,079
Posted By baseliner
Sorry, I forgot to mention, I'm using XSLT 2.0....

Sorry, I forgot to mention, I'm using XSLT 2.0. Below is the code for Var1 and Var2:


<xsl:variable name="Var1">
<xsl:for-each select="$Var0">
<xsl:variable name="currentnode"...
Forum: XSLT July 18th, 2009, 05:07 AM
Replies: 5
Views: 1,079
Posted By baseliner
key() not working within variable defined as temporary document

Hello - I'm completely stumped trying to figure this one out so any help would be much appreciated.

I'm trying to do a transformation in two steps. In the first step, I create a variable Var1...
Showing results 1 to 23 of 23

 


All times are GMT -4. The time now is 01:20 PM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.