Subject: Re: [xsl] creating multiple xml documents from one large xml document From: "LEGAULT, PHILLIP plegault@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Mon, 29 May 2023 11:22:24 -0000 |
My bad the match should be o <xsl:template match="soap:records[@xsi:type eq 'sf:Case']"> From: Bauman, Syd s.bauman@xxxxxxxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Friday, May 26, 2023 9:55 PM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: [EXTERNAL] Re: [xsl] creating multiple xml documents from one large xml document (Confession: I did not understand the original question.) If you are not getting any result file the two most likely culprits are 1. namespace problem 2. you are calling the program incorrectly I am guessing that you are calling the xslt2b program correctly (i.e., its signature is xslt2 [input] [stylesheet] [output]b), because if not, you would probably get an error (like bStylesheet file is not really a stylesheetb), not just no output. I notice that in the code you posted, the <records> element is being matched as if it were in no namespace. If that is true (the <records> element(s) in soap.xml are in no namespace), then we need to look elsewhere for a problem. If it is not true (the <records> element(s) in soap.xml are in a namespace, e.g. "http://www.w3.org/2003/05/soap-envelope/"), then that is the problem. Using either <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sf="urn:sobject.enterprise.soap.sforce.com" xmlns:soap="http://www.w3.org/2003/05/soap-envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <xsl:template match="soap:records[@xsi:type eq 'sf:CaseNote_GCC__c']"> ... or <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sf="urn:sobject.enterprise.soap.sforce.com" xpath-default-namespace="http://www.w3.org/2003/05/soap-envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> ... should do the trick. ________________________________ Ibm using Saxon XSLT 2 Calling it like: xslt2 soap.xml file.xsl hello.htm <xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sf="urn:sobject.enterprise.soap.sforce.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <xsl:template match="records[@xsi:type = 'sf:CaseNote_GCC__c']"> <xsl:result-document href="case-{sf:Id}-{sf:CaseNumber}.xml"> <xsl:copy-of select="."/> </xsl:result-document> </xsl:template> </xsl:stylesheet> Not getting any result files. XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list> EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/649132> (by email) XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list> EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/3514465> (by email<>)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] creating multiple xml doc, Bauman, Syd s.bauman | Thread | Re: [xsl] creating multiple xml doc, LEGAULT, PHILLIP ple |
Re: [xsl] Re: creating multiple xml, Eliot Kimber eliot.k | Date | Re: [xsl] creating multiple xml doc, LEGAULT, PHILLIP ple |
Month |