Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Search Forums
Password Reminder
Register
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 285
Search took 0.12 seconds.
Search: Posts Made By: mhkay
Forum: XSLT February 7th, 2019, 01:57 PM
Replies: 2
Views: 235
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 August 16th, 2018, 06:54 PM
Replies: 3
Views: 670
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 namespace...
Forum: XSLT June 7th, 2018, 05:34 AM
Replies: 5
Views: 442
Posted By mhkay
Sorry, this isn't a free code-writing service.

Sorry, this isn't a free code-writing service.
Forum: XSLT May 24th, 2018, 06:17 AM
Replies: 4
Views: 1,268
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: BOOK: XSLT 2.0 and XPath 2.0 Programmer's Reference, 4th Edition ISBN: 978-0-470-19274-0 April 9th, 2018, 11:04 AM
Replies: 2
Views: 717
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, 03:07 PM
Replies: 2
Views: 504
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 preceding-sibling...
Forum: XSLT January 31st, 2018, 08:10 PM
Replies: 2
Views: 340
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".
Forum: XSLT January 31st, 2018, 06:30 PM
Replies: 2
Views: 302
Posted By mhkay
"I have a variable that I need to set to "Y" if...

"I have a variable that I need to set to "Y" if <CRC> has a value and it's
corresponding <CRCFUNCTION> has a value of 900 in any of the associated <CRCDATALINE> for a specific <DETAILLINE>."

The...
Forum: XSLT November 12th, 2017, 04:12 PM
Replies: 2
Views: 453
Posted By mhkay
I think that the line <xsl:if...

I think that the line


<xsl:if test="matches(substring(., 1, 1), '[A-Z]')">


should be


<xsl:if test="not(matches(substring(., 1, 1), '[A-Z]'))">
Forum: XSLT July 27th, 2017, 07:44 PM
Replies: 1
Views: 481
Posted By mhkay
I think this forum is specifically about XSLT...

I think this forum is specifically about XSLT rather than XSL-FO, so you may not find anyone here who can answer.

Generally, unless your question is specifically about a Wiley/Wrox book, I would...
Forum: XSLT July 25th, 2017, 10:58 AM
Replies: 1
Views: 331
Posted By mhkay
You're almost there. You need an identity...

You're almost there. You need an identity template rules that by default copies things unchanged. Then you add higher-priority template rules for any exceptions. For example, to delete StoreNumber...
Forum: XSLT July 2nd, 2017, 06:52 PM
Replies: 2
Views: 304
Posted By mhkay
Firstly, I'd suggest that unless your question is...

Firstly, I'd suggest that unless your question is specifically about the content of a Wrox/Wiley book, you're probably better off posting the question on StackOverflow these days. That's where you...
Forum: XSLT May 9th, 2017, 07:19 PM
Replies: 2
Views: 416
Posted By mhkay
You could use an extension function that gets the...

You could use an extension function that gets the actual machine timestamp. But this offers no guarantee of uniqueness because two xsl:result-document instructions might be evaluated simultaneously...
Forum: XSLT February 8th, 2017, 06:14 AM
Replies: 21
Views: 22,799
Posted By mhkay
That's a bit clearer (I hope). It sounds as if...

That's a bit clearer (I hope). It sounds as if you want


sum(//cac:AllowanceCharge[cbc:SequenceNumeric='1']/cbc:Amount)
Forum: XSLT July 22nd, 2016, 11:12 AM
Replies: 1
Views: 476
Posted By mhkay
You do <xsl:for-each...

You do


<xsl:for-each select="Integration/ProtectionOrder[@Op='E']/Statuses/Status[((@Op='A') or (@Op='E')) and ((Type/@Word='DISMISSED'))]">


which iterates over a set of Status elements, and then...
Forum: XSLT June 28th, 2016, 01:05 PM
Replies: 7
Views: 368
Posted By mhkay
I'm sorry, Rita, I don't understand what it is...

I'm sorry, Rita, I don't understand what it is that you are trying to achieve. Please provide specimen input and output and explain how they are related. If you want to know why your code is wrong,...
Forum: XML December 30th, 2015, 12:54 PM
Replies: 4
Views: 1,002
Posted By mhkay
Both of these are perfectly workable....

Both of these are perfectly workable. Representing values as strings rather than integers is going to lead to fewer mistakes, so that would be my preference. One can't really advise on design...
Forum: XSLT November 28th, 2015, 08:38 PM
Replies: 11
Views: 528
Posted By mhkay
I would normally use regex to parse and reformat...

I would normally use regex to parse and reformat the date but there's nothing wrong with using the substring functions and as you have to manipulate the AM/PM stuff it may be easier that way. The...
Forum: XSLT November 28th, 2015, 01:54 PM
Replies: 11
Views: 528
Posted By mhkay
What have you tried and where did you get stuck?...

What have you tried and where did you get stuck? (Without knowing where you got stuck, it's very hard to help you, short of writing the whole code for you, which is not something I do.)

And are you...
Forum: XML October 7th, 2015, 11:21 AM
Replies: 2
Views: 3,142
Posted By mhkay
I'm afraid your code might have come out a bit...

I'm afraid your code might have come out a bit garbled.

It looks as if you are using XPath within some programming language where you are writing the XPath expression as a string literal in double...
Forum: XSLT September 16th, 2015, 04:57 AM
Replies: 3
Views: 1,198
Posted By mhkay
Start by writing a template that copies...

Start by writing a template that copies everything unchanged:


<xsl:template match="node()|@*">
<xsl:copy>
<xsl:apply-templates select="node()|@*"/>
</xsl:copy>
</xsl:template>
Forum: XSLT July 22nd, 2015, 10:16 AM
Replies: 3
Views: 622
Posted By mhkay
During the development of XSLT 2.0 the working...

During the development of XSLT 2.0 the working group found that there were many discrepancies in the way that XSLT 1.0 processors interpreted the 1.0 spec of xsl:number, especially in edge cases...
Forum: XSLT April 23rd, 2015, 07:26 AM
Replies: 2
Views: 419
Posted By mhkay
The answer to performance questions always...

The answer to performance questions always depends on which XSLT processor you are using.

However, I would expect that any costs incurred by xsl:include occur entirely at stylesheet compile time,...
Forum: XSLT September 11th, 2014, 10:23 AM
Replies: 3
Views: 851
Posted By mhkay
The match attribute for xsl:key needs to be a...

The match attribute for xsl:key needs to be a valid XSLT pattern. That doesn't permit a call on xalan:nodeset() (or any other function, with a couple of exceptions like id() and key()).

I'm afraid I...
Forum: XSLT August 20th, 2014, 01:04 PM
Replies: 2
Views: 447
Posted By mhkay
Did you know that your code ...

Did you know that your code


<xsl:choose>
<xsl:when test="WeightPounds">
<xsl:value-of select="WeightPounds"/>
</xsl:when>
</xsl:choose>
Showing results 1 to 25 of 285

 


All times are GMT -4. The time now is 06:47 PM.


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