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 188
Search took 0.02 seconds.
Search: Posts Made By: samjudson
Forum: XSLT June 28th, 2016, 04:57 PM
Replies: 7
Views: 402
Posted By samjudson
Wouldn't the following give you what you want? ...

Wouldn't the following give you what you want?


/doc/EOB/DETAIL/DETAILLINE/PRESCRIBINGPROVIDER[FULLNAME!='']/NPIINFO/NATIONALPROVIDERID
Forum: XSLT March 9th, 2016, 10:31 AM
Replies: 6
Views: 344
Posted By samjudson
Oh, and final count would be something using the...

Oh, and final count would be something using the count() and distinct-values() functions.
Forum: XSLT March 9th, 2016, 10:24 AM
Replies: 6
Views: 344
Posted By samjudson
You probably want to use the xsl:for-each-group...

You probably want to use the xsl:for-each-group instruction, something like this:


<xsl:for-each-group select="Position" group-by="concat(location, '|', code, '|', costCenter)">
......
Forum: XSLT February 2nd, 2016, 07:59 AM
Replies: 6
Views: 5,105
Posted By samjudson
You realise you've posted on the end of a SIX...

You realise you've posted on the end of a SIX year old thread, and we have no idea what you are trying to do.

Please start a new thread and explain exactly what you are trying to do, what you have...
Forum: XML March 19th, 2015, 12:31 PM
Replies: 2
Views: 704
Posted By samjudson
I'm assuming this is XSLT 1? If I remember...

I'm assuming this is XSLT 1?

If I remember correctly in XSLT 1 a function like starts-with only takes a single value, not a sequence, so terms/gr is equivalent to terms/gr[1], i.e. the first gr...
Forum: XSLT January 20th, 2015, 11:50 AM
Replies: 4
Views: 577
Posted By samjudson
Strange, I didn't ask IF you had tried, I asked...

Strange, I didn't ask IF you had tried, I asked WHAT you had tried...

Could you post examples of what you have tried, and we will try to work out what you are doing wrong (helping you learn).
Forum: XSLT January 20th, 2015, 10:26 AM
Replies: 4
Views: 577
Posted By samjudson
What have you tried so far? If it is just the...

What have you tried so far? If it is just the regex you need then googling would be of more help.

Also consider reading the post here: http://p2p.wrox.com/xslt/47716-hints-good-xslt-post.html
Forum: XSLT January 8th, 2015, 05:56 AM
Replies: 4
Views: 378
Posted By samjudson
What you were probably wanting to do was this: ...

What you were probably wanting to do was this:


<xsl:variable name="foo" select="'foobah'"/>


That creates a variable $foo and assigns it the string 'foobah'. What you has previously was...
Forum: XSLT December 19th, 2014, 07:55 AM
Replies: 2
Views: 477
Posted By samjudson
I don't see HeightInches? If you include things...

I don't see HeightInches? If you include things in a calculation that don't exist then it will always come out of NaN (Not A Number).

Sam
Forum: XSLT September 30th, 2014, 04:16 AM
Replies: 3
Views: 482
Posted By samjudson
If you want the first of something matching...

If you want the first of something matching "X[@Y='Z']" then simply append [1] on the end, e.g. "X[@Y='Z'][1]".
Forum: XSLT July 14th, 2014, 11:59 AM
Replies: 1
Views: 271
Posted By samjudson
So the section number is the number of 'para'...

So the section number is the number of 'para' elements above the current 'para' element?

Try:


<para section="{count(ancestor-or-self::para)}">
Forum: XSLT June 24th, 2014, 09:26 AM
Replies: 1
Views: 724
Posted By samjudson
Have you tried ps:PriceSim by any chance? ...

Have you tried ps:PriceSim by any chance?

There is not difference between env and mp prefixes (i.e. they refer to the same namespace) but the ps prefix refers to a different namespace.
Forum: XSLT April 16th, 2014, 04:04 AM
Replies: 1
Views: 463
Posted By samjudson
<cell dim="{$U} 1"> or <cell> ...

<cell dim="{$U} 1">


or


<cell>
<xsl:attribute name="dim"><xsl:value-of select="$U"/> 1</xsl:attribute>
...
</cell>
Forum: XSLT April 16th, 2014, 04:01 AM
Replies: 4
Views: 1,297
Posted By samjudson
The error "Value was either too large or too...

The error "Value was either too large or too small for an Int32" is exactly the error you get when calling int.Parse in .Net code and try to parse something bigger than int.MAXVALUE (which I'm...
Forum: XSLT February 24th, 2014, 05:48 AM
Replies: 4
Views: 703
Posted By samjudson
This isn't really got anything to do with XSLT...

This isn't really got anything to do with XSLT has it?

Email clients are some of the worst HTML renders out there. Outlook is functionally equivalent to IE4 if I remember correctly.
Forum: XSLT August 27th, 2013, 11:37 AM
Replies: 4
Views: 1,100
Posted By samjudson
Well you appear to be storing some XML (if indeed...

Well you appear to be storing some XML (if indeed your XSLT works, I haven't checked) into a variable called "data". But you never output the data variable.

The output you are seeing is from...
Forum: XSLT August 14th, 2013, 03:59 AM
Replies: 7
Views: 846
Posted By samjudson
Firstly you need to put the xsl:apply-templates...

Firstly you need to put the xsl:apply-templates inside the output div:


<div>
<xsl:attribute .. />
<xsl:apply-templates/>
</div>


Then you just need to specify a "count" attribute...
Forum: XSLT June 7th, 2013, 10:41 AM
Replies: 8
Views: 1,090
Posted By samjudson
Are you sure this is what is being output? Having...

Are you sure this is what is being output? Having an < inside an attribute is not valid XML, so I doubt that the Saxon XSLT processor is generating it. Either you are explicitly telling Saxon to...
Forum: XSLT December 1st, 2012, 11:23 AM
Replies: 2
Views: 3,479
Posted By samjudson
The error is because you are creating an element,...

The error is because you are creating an element, then adding text to it, then trying to add an attribute to it. You need to add the attributes first:


<xsl:element name="error">
...
Forum: XSLT August 23rd, 2012, 10:31 AM
Replies: 6
Views: 1,010
Posted By samjudson
I don't see what the problem is. My proposed...

I don't see what the problem is. My proposed solution appears to produce exactly the output you are asking for.
Forum: XSLT July 11th, 2012, 09:30 AM
Replies: 7
Views: 957
Posted By samjudson
If you are using .Net then no, you probably...

If you are using .Net then no, you probably wouldn't use the xml-stylesheet instruction as you'd be much better controlling the stylesheet etc from in code.

Using the XslCompiledTransform Class:...
Forum: XSLT July 11th, 2012, 06:48 AM
Replies: 7
Views: 957
Posted By samjudson
You can load the lookups into global variables,...

You can load the lookups into global variables, outside of any template. Then you can use them within any template. Also it is often easier if your variable names mean something (and you need single...
Forum: XSLT June 29th, 2012, 04:33 AM
Replies: 3
Views: 623
Posted By samjudson
You can't update a variable in XSLT - its a...

You can't update a variable in XSLT - its a functional programming language.

The following should give you the max of all attr_1 attribute values of the child element.

<xsl:variable name="maxY"...
Forum: XSLT May 24th, 2012, 10:25 AM
Replies: 9
Views: 1,244
Posted By samjudson
If you are in a template matching against...

If you are in a template matching against /CDR/DRTA then you don't need the /CDR/DRTA in from of every value of instruction (in fact if you had more than one DRTA element this would produce something...
Forum: XSLT March 29th, 2012, 11:26 AM
Replies: 6
Views: 41,794
Posted By samjudson
Err, well you'd get it to output XML rather than...

Err, well you'd get it to output XML rather than CSV by writing XML in the XSLT, rather than text.

e.g.


<Sku><xsl:value-of select="Sku"/></Sku>


or indeed if you want to copy an element...
Showing results 1 to 25 of 188

 


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


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