xsl-list
[Top] [All Lists]

RE: [xsl] Re: xsl-list Digest 16 Jan 2007 06:10:00 -0000 Issue 1019

2007-01-16 02:21:29
Sorry if my code was wrong - it does happen! But I can assure you the
principle was sound, it just needs debugging. If you need help debugging it,
it's best if you can post the code as it now stands, because few people are
likely to have the energy to go through the archives.

If you've got a path expression like current-group()/w:p/w:r/w:t that is't
returning anything, quite a good diagnostic technique is to do

<debug>
  <xsl:copy-of select="current-group()"/>
</debug>

which will often reveal where the misunderstanding arose.

Even better, of course, is to write a schema-aware stylesheet in which case
you'll often get an explanation at compile time when you've written a path
expression that can't select anything.

Michael Kay
http://www.saxonica.com/  

-----Original Message-----
From: Frank Hopper [mailto:frank(_dot_)hopper(_at_)gmx(_dot_)de] 
Sent: 16 January 2007 07:59
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Re: xsl-list Digest 16 Jan 2007 06:10:00 -0000 
Issue 1019

I tried "<xsl:value-of 
select="current-group()/w:p/w:r/w:t"/>", but now the 
<pageContent> node is empty.

----------------------------
  RECEIVED_OUTPUT.XML
----------------------------
<?xml version='1.0' encoding='utf-8' ?>
<root
  
xmlns:w="http://schemas.openxmlformats.org/wordprocessingml/20
06/main">
   <pageData>
     <pageTitle>1. Web Page Title</pageTitle>
     <pageContent/>
   </pageData>
   <pageData>
     <pageTitle>2. Web Page Title</pageTitle>
     <pageContent/>
   </pageData>
</root>

To me it seems like the only information I can get to from 
within the for-each-group instruction is the pageTitle.

Thanks,
Frank

 > -----Original Message-----
 > Date: Mon, 15 Jan 2007 11:55:30 -0000  > To: 
<xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>  > From: "Michael Kay" 
<mike(_at_)saxonica(_dot_)com>  > Subject: RE: [xsl] Grouping  Word 2007 
content by customXml nodes  > Message-ID: 
<00ec01c7389c$0e78cd40$6401a8c0(_at_)turtle>
 >
 > In this expression:
 >
 > <xsl:value-of select="//w:p/w:r/w:t"/>  >  > "//" selects 
from the root of the document. You want to select relative to 
 > what's selected by xsl:for-each-group, that is 
current-group(). So try:
 >
 > <xsl:value-of select="current-group()/w:p/w:r/w:t"/>

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>