RE: [xsl] Numbering cross refs

Subject: RE: [xsl] Numbering cross refs
From: "Norma Yeazell" <Nyeazell@xxxxxxxxx>
Date: Thu, 11 Dec 2003 10:23:09 -0500
The figure does have attribute ID and the following method seems to be
the only one where I get a # at all even though it is wrong.

<xsl:template match="xref">
             <fo:basic-link background-color="lightblue"
internal-destination="{@idref}">
                <xsl:text>Fig. </xsl:text>
                    <xsl:number count="figure" level="any"
from="mainfunc" format="1"/>
            </fo:basic-link>
</xsl:template>

When I add for-each that's when I start getting Fig. nothing. I believe
I have tried key before also but maybe I didn't do it right, as I said
I'm pretty new to this.

Thanks in advance for the help!

Here are parts of relavent schema I'm using unless I read it wrong
figure does have ID

<xs:element name="figure">
	<xs:annotation>
		<xs:documentation>
	
**********************************************************************
	    * Define Element FIGURE (Figure) containing:-
*
	
*====================================================================*
	    * Mandatory Single Group.
*
	
*====================================================================*
	    *  Definition stored in entity %titles;
*
	
*====================================================================*
	    *  GRAPHIC  - mandatory  single      contains No Other Tags.
*
	    *  RFA      - optional   repeatable  contains APPLIC,
definition     *
	    *                                    stored in entity %text;
*
	    * or
*
	
*====================================================================*
	    * Mandatory Repeatable Group.
*
	
*====================================================================*
	    *  APPLIC   - optional   single      contains TYPE, MODEL.
*
	    *  SHEET    - mandatory  single      contains No Other Tags.
*
	    *  GRAPHIC  - mandatory  single      contains No Other Tags.
*
	    *  RFA      - optional   repeatable  contains APPLIC,
definition     *
	    *                                    stored in entity %text;
*
	
*====================================================================*
	    *  LEGEND   - optional   single      contains DEFLIST.
*
	
*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
	    * Attribute(s):-
*
	    * Attribute Definition List stored in entity %bodyatt;
*
	    * Attribute Definition List stored in entity %secur;
*
	
**********************************************************************
	    * EXCLUSION : FIGURE, FOLDOUT, TABLE.
*
	
********************************************************************** 

	    EXCLUSION: 
	              -(figure | foldout | table) >
		</xs:documentation>
	</xs:annotation>
	
	<xs:complexType>
		<xs:sequence>
			<xs:group ref="titles"/>	
			<xs:choice>
				<xs:sequence>
					<xs:element ref="graphic"/>
					<xs:element ref="rfa"
minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
				<xs:sequence maxOccurs="unbounded">
					<xs:element ref="applic"
minOccurs="0"/>
					<xs:element ref="sheet"/>
					<xs:element ref="graphic"/>
					<xs:element ref="rfa"
minOccurs="0" maxOccurs="unbounded"/>
				</xs:sequence>
			</xs:choice>
			<xs:element ref="legend" minOccurs="0"/>
		</xs:sequence>
		<xs:attributeGroup ref="bodyatt"/> 
		<xs:attributeGroup ref="secur"/>
	</xs:complexType>
</xs:element>


<xs:element name="sheet">
	<xs:annotation>
		<xs:documentation>
	
**********************************************************************
	    * Define Element SHEET (Figure Sheet Number) containing:-
*
	    *  No Other Tags.
*
	
*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
	    * Attribute(s):-
*
	    *  SHEETNO  - NUMBER   - REQUIRED - Sheet number.
*
	    *  TOTAL    - NUMBER   - REQUIRED - Total number of sheets.
*
	    *  Attribute Definition List stored in entity %bodyatt;
*
	
**********************************************************************
		</xs:documentation>
	</xs:annotation>
	
	<xs:complexType>
		<xs:attribute name="sheetno" type="xs:string"
use="required"/>
		<xs:attribute name="total" type="xs:string"
use="required"/>
		<xs:attributeGroup ref="bodyatt"/> 
	</xs:complexType>
</xs:element>




	<xs:attributeGroup name="bodyatt">
		<xs:annotation>
			<xs:documentation>
	
**********************************************************************
				* Define Attributes %bodyatt; (Body
Attributes) containing:-         *
				*  Attribute Definition List.
*
	
*@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@*
				* Attribute(s):-
*
				*  ID        - ID       - Implied  - An
identifier of the element    *
				*                       which is
assigned at origination and which   *
				*                       remains
unchanged as the document is revised *
				*                       or updated even
though the automatically     *
				*                       assigned
enumeration "labels" change. The    *
				*                       value of "id" is
used when making references *
				*                       to the element
from other portions of the    *
				*                       document.
*
				* Attribute Definition List stored in
entity %INSDEL;                *
	
********************************************************************** 
			</xs:documentation>
		</xs:annotation>
		<xs:attribute name="id" type="xs:ID"/>
		<xs:attributeGroup ref="INSDEL"/>
	</xs:attributeGroup> 



Confidentiality Notice
The information contained in this e-mail is confidential and intended for use only by the person(s) or organization listed in the address. If you have received this communication in error, please contact the sender at O'Neil & Associates, Inc., immediately. Any copying, dissemination, or distribution of this communication, other than by the intended recipient, is strictly prohibited.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread