Click here to Skip to main content
15,926,144 members
Home / Discussions / XML / XSL
   

XML / XSL

 
GeneralXML Web Services and SOAP Pin
Nino_130-Jul-03 10:19
Nino_130-Jul-03 10:19 
GeneralRe: XML Web Services and SOAP Pin
Jason Weibel1-Aug-03 9:16
Jason Weibel1-Aug-03 9:16 
GeneralPassing XmlResolver to Transform() method Pin
kyledunn29-Jul-03 10:09
kyledunn29-Jul-03 10:09 
GeneralRe: Passing XmlResolver to Transform() method Pin
Philip Fitzsimons1-Aug-03 2:42
Philip Fitzsimons1-Aug-03 2:42 
GeneralRe: Passing XmlResolver to Transform() method Pin
kyledunn7-Aug-03 8:43
kyledunn7-Aug-03 8:43 
GeneralXSL - grab unprocessed nodes Pin
Christian Graus28-Jul-03 19:12
protectorChristian Graus28-Jul-03 19:12 
GeneralRe: XSL - grab unprocessed nodes Pin
bart sawyer28-Jul-03 20:49
bart sawyer28-Jul-03 20:49 
GeneralRe: XSL - grab unprocessed nodes Pin
Stuart Dootson28-Jul-03 20:57
professionalStuart Dootson28-Jul-03 20:57 
One possibility might be to use XMLdiff[^] to highlight deltas.

Alternatively, you could investigate modes - you could process the node-set twice, once in a 'processing' mode, once in a 'not-processing' mode, using specific templates only for the nodes you want to process - consider this:

test.xml
<section>
  <A>Text A</A>
  <A>Text A 2</A>
  <B>Text C</B>
  <C>Text C</C>
  <D>Text D</D>
</section>


test.xslt
<xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
      extension-element-prefixes="redirect">

<xsl:template match="section">
   <xsl:element name="test">
      <xsl:element name="processed">
        <xsl:apply-templates mode="normal"/>
      </xsl:element>
      <xsl:element name="not-processed">
        <xsl:apply-templates mode="show-not-processed"/>
      </xsl:element>
    </xsl:element>
</xsl:template>

<xsl:template match="A" mode="normal">
   <xsl:value-of select="name()"/>
</xsl:template>
<xsl:template match="C" mode="normal">
   <xsl:value-of select="name()"/>
</xsl:template>
<xsl:template match="A|C" mode="show-not-processed"/>


<xsl:template match="*" mode="normal"/>


<xsl:template match="*" mode="show-not-processed">
   <xsl:value-of select="name()"/>
</xsl:template>


</xsl:stylesheet >


test.out.xml (produced using Xalan 2.3.1 with test.xml as input and test.xslt as the stylesheet)
<?xml version="1.0" encoding="UTF-8"?>
<test><processed>
  A
  A
  
  C
  
</processed><not-processed>
  
  
  B
  
  D
</not-processed></test>


The stylesheet uses the 'match-all' templates to mop up any nodes you don't mention explicitly in a template, so it's just a case of listing all the nodes you process in this template:

<xsl:template match="A|C" mode="show-not-processed"/>


HTH

Stuart Dootson

'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
GeneralNot an answer Pin
Paul Watson6-Aug-03 2:33
sitebuilderPaul Watson6-Aug-03 2:33 
GeneralRe: Not an answer Pin
Christian Graus6-Aug-03 11:38
protectorChristian Graus6-Aug-03 11:38 
GeneralXML - Stylesheets - for removing schema info Pin
qwerty987654321025-Jul-03 6:43
qwerty987654321025-Jul-03 6:43 
GeneralRe: XML - Stylesheets - for removing schema info Pin
Philip Fitzsimons28-Jul-03 2:25
Philip Fitzsimons28-Jul-03 2:25 
Generalxml to listbox Pin
jphuphilly24-Jul-03 4:19
jphuphilly24-Jul-03 4:19 
GeneralSelect top 5 &quot;rows&quot; in XML -file Pin
Mac B23-Jul-03 22:40
sussMac B23-Jul-03 22:40 
GeneralRe: Select top 5 &quot;rows&quot; in XML -file Pin
Nick Parker25-Jul-03 7:04
protectorNick Parker25-Jul-03 7:04 
GeneralRe: Select top 5 &quot;rows&quot; in XML -file Pin
Philip Patrick26-Jul-03 21:26
professionalPhilip Patrick26-Jul-03 21:26 
GeneralAccessing an XML sequence Pin
Bernhard Hofmann23-Jul-03 0:24
Bernhard Hofmann23-Jul-03 0:24 
GeneralRe: Accessing an XML sequence Pin
Philip Patrick26-Jul-03 21:22
professionalPhilip Patrick26-Jul-03 21:22 
GeneralPopulating Treeview Control with XML Explicit Pin
djoy22-Jul-03 16:43
djoy22-Jul-03 16:43 
GeneralVisulisations Pin
Davy Mitchell22-Jul-03 7:59
Davy Mitchell22-Jul-03 7:59 
GeneralGetting to xsl:template to match only nodes with a certain attribute Pin
Taka Muraoka22-Jul-03 3:22
Taka Muraoka22-Jul-03 3:22 
GeneralRe: Getting to xsl:template to match only nodes with a certain attribute Pin
Mark Smithson22-Jul-03 3:50
Mark Smithson22-Jul-03 3:50 
GeneralRe: Getting to xsl:template to match only nodes with a certain attribute Pin
Taka Muraoka22-Jul-03 3:57
Taka Muraoka22-Jul-03 3:57 
General<![CDATA Pin
Hesham Amin21-Jul-03 21:39
Hesham Amin21-Jul-03 21:39 
GeneralRe: &lt;![CDATA Pin
ZoogieZork22-Jul-03 0:46
ZoogieZork22-Jul-03 0:46 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.