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 500
Search took 0.05 seconds.
Search: Posts Made By: Martin Honnen
Forum: XSLT February 11th, 2019, 05:44 PM
Replies: 6
Views: 586
Posted By Martin Honnen
If you use an XSLT 1 processor then, as the input...

If you use an XSLT 1 processor then, as the input elements are in a namespace, in the XSLT you need to declare that and use it to qualify element names:

<xsl:stylesheet version="1.0"...
Forum: XSLT February 11th, 2019, 12:34 PM
Replies: 6
Views: 586
Posted By Martin Honnen
The suggestion of Mike works fine for me at...

The suggestion of Mike works fine for me at https://xsltfiddle.liberty-development.net/ej9EGbX, I suppose your real XML has some namespaces you have not shown so that the template Mike has suggested...
Forum: XSLT December 4th, 2018, 05:21 AM
Replies: 6
Views: 585
Posted By Martin Honnen
It is hard to understand your completely...

It is hard to understand your completely unindented input and output samples but I think you can use for-each-group, as already suggested (of course assuming you use an XSLT 2 or 3 processor like...
Forum: XSLT October 9th, 2018, 03:01 AM
Replies: 12
Views: 43,210
Posted By Martin Honnen
Please start a thread of your own and then insert...

Please start a thread of your own and then insert well-formatted and minimal code sample of XML files and wanted results to demonstrate the problem. Dumping hundreds of unformatted lines into a...
Forum: XML August 9th, 2018, 11:00 AM
Replies: 4
Views: 1,651
Posted By Martin Honnen
Can you try to simply use Dim result As...

Can you try to simply use

Dim result As Object = objXMLNode.CreateNavigator().Evaluate("*[(local-name(.)='CitationDocument') or...
Forum: XML August 9th, 2018, 10:37 AM
Replies: 4
Views: 1,651
Posted By Martin Honnen
The methods "SelectNodes" and "SelectSingleNode"...

The methods "SelectNodes" and "SelectSingleNode" only work with XPath expressions that select nodes, if you want to evaluate XPath expressions returning a primitive value like a string, a number or a...
Forum: XML August 3rd, 2018, 03:53 PM
Replies: 5
Views: 745
Posted By Martin Honnen
The second argument to "ImportNode" being "True"...

The second argument to "ImportNode" being "True" should ensure a deep copy is imported (https://msdn.microsoft.com/en-us/library/system.xml.xmldocument.importnode(v=vs.110).aspx) so I can't really...
Forum: XML August 3rd, 2018, 11:22 AM
Replies: 5
Views: 745
Posted By Martin Honnen
There is an "ImportNode" method for "XmlDocument"...

There is an "ImportNode" method for "XmlDocument" you can use e.g.


objXMLCopyOfOriginalInputDoc.DocumentElement.SelectSingleNode("soap:Body",...
Forum: XSLT May 24th, 2018, 06:42 AM
Replies: 4
Views: 1,719
Posted By Martin Honnen
There is nothing in your code as posted that...

There is nothing in your code as posted that should change the namespace of the "MessageParts" elements and indeed it is not changed, however in the input the namespace is duplicated, the XSLT...
Forum: XSLT May 24th, 2018, 05:22 AM
Replies: 4
Views: 1,719
Posted By Martin Honnen
If you move to XSLT 2 or even 3 with Saxon 9 you...

If you move to XSLT 2 or even 3 with Saxon 9 you can ease your task of matching elements in a namespace and of copying everything except the nodes for which you write templates with
...
Forum: XSLT May 23rd, 2018, 04:25 AM
Replies: 3
Views: 586
Posted By Martin Honnen
Also, is the number of nested category levels...

Also, is the number of nested category levels static? Can you explain in words how the merging of the data elements like content or products is supposed to happen, e.g. if you simply want to use the...
Forum: XSLT May 23rd, 2018, 04:15 AM
Replies: 3
Views: 586
Posted By Martin Honnen
As you mention Java, can we assume that you can...

As you mention Java, can we assume that you can use Saxon 9 and XSLT 2 or 3 for the XSLT?
Forum: XSLT May 20th, 2018, 11:59 AM
Replies: 9
Views: 633
Posted By Martin Honnen
You need to have that list of files in a separate...

You need to have that list of files in a separate XML document (e.g. "file-list.xml") and then you can read in for-each...
Forum: XSLT April 30th, 2018, 08:55 AM
Replies: 17
Views: 1,083
Posted By Martin Honnen
I managed to omit a crucial .. in the key...

I managed to omit a crucial
..
in the key definition, now edited and corrected, the code would be

<xsl:output indent="yes"/>
<xsl:strip-space elements="*"/>

<xsl:key name="dup"...
Forum: XSLT April 30th, 2018, 08:20 AM
Replies: 17
Views: 1,083
Posted By Martin Honnen
I am currently not sure I understood the document...

I am currently not sure I understood the document structure last Saturday or I understand it now, that is why I asked about the "KeyFacts" elements and whether it would suffice to eliminate duplicate...
Forum: XSLT April 30th, 2018, 07:56 AM
Replies: 17
Views: 1,083
Posted By Martin Honnen
Well, which XSLT processor do you use, which XSLT...

Well, which XSLT processor do you use, which XSLT version does it support? Can you switch to Saxon 9 or another XSLT 2 or 3 processor? The third argument to the key function was introduced in XSLT 2,...
Forum: XSLT April 29th, 2018, 04:41 AM
Replies: 3
Views: 640
Posted By Martin Honnen
I would use <xsl:stylesheet...

I would use


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns="http://www.fund1.org"
version="2.0">

<xsl:template match="/FundXML">
<FundXML...
Forum: XSLT April 28th, 2018, 12:39 PM
Replies: 17
Views: 1,083
Posted By Martin Honnen
I wanted you to change the other match pattern.

I wanted you to change the other match pattern.
Forum: XSLT April 28th, 2018, 12:06 PM
Replies: 17
Views: 1,083
Posted By Martin Honnen
My suggestion was to simply change that one match...

My suggestion was to simply change that one match pattern to the one I posted, the rest of your code did not need any change but need to be kept. So don't change the key declaration and simply edit...
Forum: XSLT April 28th, 2018, 10:52 AM
Replies: 17
Views: 1,083
Posted By Martin Honnen
Are you really restricted to XSLT 1.0? In XSLT...

Are you really restricted to XSLT 1.0?
In XSLT 2 you could use match="Registration[generate-id() = generate-id(key('kMapping', Country, ancestor::Fund)[1])]" or use for-each-group
Forum: XML April 14th, 2018, 04:12 AM
Replies: 2
Views: 646
Posted By Martin Honnen
It depends on the XML format you have and your...

It depends on the XML format you have and your programming skill set, if you know XSLT and XSL-FO or are willing to learn them then you can use software like Saxon 9 and Apache FOP to transform any...
Forum: XSLT November 17th, 2017, 08:15 AM
Replies: 5
Views: 1,341
Posted By Martin Honnen
Use <xsl:value-of...

Use
<xsl:value-of select="sum(key('unike-prod-ids', ProductId)/Quantity)"/>
to sum the Quantity of items you have grouped with MUenchian grouping.
Forum: XSLT October 12th, 2017, 04:22 AM
Replies: 4
Views: 574
Posted By Martin Honnen
With XSLT 2.0 you can use the same grouping...

With XSLT 2.0 you can use the same grouping approach but not directly on string values, instead you first have to convert the data to XML and then you can use the for-each-group group-starting-with...
Forum: XSLT October 11th, 2017, 11:33 AM
Replies: 4
Views: 574
Posted By Martin Honnen
If you use Saxon 9.8 then I think you can solve...

If you use Saxon 9.8 then I think you can solve that with XSLT 3.0 and for-each-group group-starting-with:


<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
...
Forum: XSLT March 22nd, 2017, 03:15 AM
Replies: 10
Views: 785
Posted By Martin Honnen
Xalan only supports XSLT and XPath 1.0 so you...

Xalan only supports XSLT and XPath 1.0 so you need to use Saxon 9 or another XSLT 2.0 processor to use the suggestions made so far.
Showing results 1 to 25 of 500

 


All times are GMT -4. The time now is 09:12 PM.


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