Subject: Re: [xsl] creating multiple xml documents from one large xml document From: "Bauman, Syd s.bauman@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 27 May 2023 01:54:11 -0000 |
(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<>)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] creating multiple xml doc, LEGAULT, PHILLIP ple | Thread | Re: [xsl] creating multiple xml doc, LEGAULT, PHILLIP ple |
Re: [xsl] creating multiple xml doc, LEGAULT, PHILLIP ple | Date | Re: [xsl] creating multiple xml doc, Michael Kay mike@xxx |
Month |