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 25 of 500
Search took 0.05 seconds.
Search: Posts Made By: mhkay
Forum: XSLT September 9th, 2019, 04:25 AM
Replies: 6
Views: 702
Posted By mhkay
Actually, it's not clear to me why Saxon should...

Actually, it's not clear to me why Saxon should produce this message. In Saxon 9.9, we follow the XSLT 3.0 and XPath 3.1 rules whatever the stylesheet version says. In earlier releases we try to...
Forum: XSLT September 9th, 2019, 03:52 AM
Replies: 6
Views: 702
Posted By mhkay
Non-capturing groups were not part of the regex...

Non-capturing groups were not part of the regex syntax defined in XPath 2.0, but they were added to the syntax for XPath 3.0 and 3.1.

What Perl allows is irrelevant: every regex dialect is...
Forum: XSLT September 5th, 2019, 05:56 AM
Replies: 6
Views: 702
Posted By mhkay
Try something like this: <xsl:template...

Try something like this:


<xsl:template match="asset/query">
<query>
<xsl:variable name="merged"
select="string-join(query/sql-statement!replace('--.*$', ''), '#xa;')"/>
...
Forum: XSLT September 4th, 2019, 04:14 AM
Replies: 6
Views: 702
Posted By mhkay
I would suggest getting rid of the single-line...

I would suggest getting rid of the single-line comments the way you do now, then merge all the SQL lines into one using string-join() with newline as a separator, then get rid of the multi-line...
Forum: XSLT August 29th, 2019, 04:13 AM
Replies: 3
Views: 252
Posted By mhkay
Unfortunately you haven't shown the generateid...

Unfortunately you haven't shown the generateid named template.

Saxon's implementation of generate-id() delivers a two-part ID, the document number which will vary between runs, and the node-id...
Forum: XSLT August 29th, 2019, 03:20 AM
Replies: 3
Views: 252
Posted By mhkay
You need to tell us more about what you are doing...

You need to tell us more about what you are doing (what's the source document, what is the stylesheet) and why the results are unsatisfactory. Please reduce it to the minimum example that...
Forum: XSLT February 11th, 2019, 12:08 PM
Replies: 6
Views: 653
Posted By mhkay
You don't need a sort here, just do ...

You don't need a sort here, just do


<xsl:template match="Lines">
<Lines>
<xsl:apply-templates select="CreditLines"/>
<xsl:apply-templates select="DebitLines"/>
</Lines>...
Forum: XSLT February 7th, 2019, 01:57 PM
Replies: 2
Views: 463
Posted By mhkay
It's very hard to help on this sort of question...

It's very hard to help on this sort of question without seeing the source document; it also helps to show the current result you are getting and how this differs from the desired result.

You could...
Forum: XSLT December 6th, 2018, 05:08 AM
Replies: 6
Views: 645
Posted By mhkay
Go away, you scum. Find a way to promote your...

Go away, you scum. Find a way to promote your business that doesn't make your readers hate you.
Forum: XSLT December 4th, 2018, 06:52 AM
Replies: 6
Views: 645
Posted By mhkay
I'm afraid it's over 15 years since I used XSLT...

I'm afraid it's over 15 years since I used XSLT 1.0 in anger and I've forgotten most of the workarounds.

And of course, it's no fun working with old technology when you know the problem is...
Forum: XSLT December 4th, 2018, 04:38 AM
Replies: 6
Views: 645
Posted By mhkay
In XSLT 2.0, use <xsl:for-each-group...

In XSLT 2.0, use


<xsl:for-each-group select="*" group-starting-with="Item">
<Item>
... item details ...
<xsl:for-each select="current-group()[self::DeliveryInfo]">
......
Forum: XSLT August 17th, 2018, 03:17 AM
Replies: 3
Views: 884
Posted By mhkay
Please don't ask new questions on an existing...

Please don't ask new questions on an existing thread.

Despite its name, Attribute is not an attribute, it is an element. And Name is an attribute, and A-AssetFileName is a string literal.

And...
Forum: XSLT August 16th, 2018, 05:54 PM
Replies: 3
Views: 884
Posted By mhkay
The elements in your source XML are in a...

The elements in your source XML are in a namespace, but your stylesheet is matching no-namespace element names. You need


<xsl:template match="/x:Data/x:Entities/x:Entity">


with the...
Forum: XSLT June 8th, 2018, 03:50 AM
Replies: 1
Views: 740
Posted By mhkay
Despite the title of your question, you don't...

Despite the title of your question, you don't seem to be changing the "element text" at all, you are only changing the name.

Define a mapping from old names to new names like this:


<xsl:key...
Forum: XSLT June 7th, 2018, 04:34 AM
Replies: 5
Views: 631
Posted By mhkay
Sorry, this isn't a free code-writing service.

Sorry, this isn't a free code-writing service.
Forum: XSLT June 7th, 2018, 03:26 AM
Replies: 5
Views: 631
Posted By mhkay
Information on writing Java extension functions...

Information on writing Java extension functions for calling from Saxon XSLT code can be found here:

http://www.saxonica.com/documentation/index.html#!extensibility

The mechanism of "reflexive...
Forum: XSLT May 24th, 2018, 05:17 AM
Replies: 4
Views: 2,089
Posted By mhkay
Firstly, your source element is in a namespace,...

Firstly, your source element is in a namespace, but you are matching elements in no namespace. Instead of match="DocumentDestinationPartner" you need match="p:DocumentDestinationPartner" where the...
Forum: XSLT May 19th, 2018, 05:26 PM
Replies: 9
Views: 655
Posted By mhkay
To read multiple XML files in a transformation...

To read multiple XML files in a transformation you will generally want to use the document() function.

For example if your main input document contains a list of files to be processed like this:
...
Forum: XSLT May 17th, 2018, 11:52 AM
Replies: 9
Views: 655
Posted By mhkay
Start by reading my book.

Start by reading my book.
Forum: XSLT May 17th, 2018, 10:35 AM
Replies: 9
Views: 655
Posted By mhkay
I'm happy to help you debug your code if you're...

I'm happy to help you debug your code if you're completely stuck, but I'm not going to write the code for you. Show how far you've got, and indicate how it's failing.

Note that to post code on...
Forum: XSLT April 9th, 2018, 10:50 AM
Replies: 2
Views: 530
Posted By mhkay
It's certainly possible in XSLT, though as...

It's certainly possible in XSLT, though as there's no XML involved other rule-based languages like awk might be better.

If you're going to use XSLT, make sure it's version 2.0 or higher: you'll...
Forum: BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 April 9th, 2018, 10:04 AM
Replies: 2
Views: 1,186
Posted By mhkay
I regret there are no current plans for a new...

I regret there are no current plans for a new edition covering XSLT 3.0. Various reasons for this, the main ones being (a) the pressure on my time, (b) not many people buy books covering a new...
Forum: XSLT March 20th, 2018, 02:07 PM
Replies: 2
Views: 616
Posted By mhkay
Sorry, Rita, I'm having trouble understanding the...

Sorry, Rita, I'm having trouble understanding the question.

Perhaps your requirement is:

For a CRCDATALINE, print (something) if (a) PDFPRINT is "Y" or absent, and (b) there is no...
Forum: XSLT February 26th, 2018, 03:39 AM
Replies: 3
Views: 665
Posted By mhkay
Your question makes no sense. Please explain more...

Your question makes no sense. Please explain more carefully what you are trying to achieve.
Forum: XSLT January 31st, 2018, 08:10 PM
Replies: 2
Views: 457
Posted By mhkay
There's lots of whitespace before and after the...

There's lots of whitespace before and after the "N", which makes the variable not equal to the simple string "N".
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 04:35 PM.


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