[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: creating multiple xml documents from one large xml

Subject: Re: creating multiple xml documents from one large xml document
From: "LEGAULT, PHILLIP plegault@xxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Mon, 29 May 2023 14:54:00 -0000
Re:  creating multiple xml documents from one large xml
That works better,

Thanks for your help

From: Martin Honnen martin.honnen@xxxxxx
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Monday, May 29, 2023 9:11 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: [EXTERNAL] Re:  creating multiple xml documents from one large
xml document



On 5/29/2023 2:39 PM, LEGAULT, PHILLIP
plegault@xxxxxxxxxx<mailto:plegault@xxxxxxxxxx> wrote:
I tried adding the namespace and still nothing



With XSLT 2 or 3, to have your pattern match e.g. records xsi:type="sf:Case"
within a certain namespace you would declare

  xpath-default-namespace="urn:enterprise.soap.sforce.com"

on the xsl:stylesheet or xsl:transform root element or for local application
only on the xsl:template.



Then e.g. <xsl:template match="records[@xsi:type = 'sf:Case']"> should match
that records element.

From: Michael Kay mike@xxxxxxxxxxxx<mailto:mike@xxxxxxxxxxxx>
<xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx><mailto:xsl-list-service@xxxxxxxxxxx
rrytech.com>
Sent: Monday, May 29, 2023 8:14 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: [EXTERNAL] Re:  creating multiple xml documents from one large
xml document

Standard namespace problem (often seen with SOAP): your elements are in a
namespace

 xmlns="urn:enterprise.soap.sforce.com<http://enterprise.soap.sforce.com/>"

which you ignored when trying to match them.


<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:sf="urn:sobject.enterprise.soap.sforce.com<http://sobject.enterpris
e.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/3514465> (by
email<>)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.