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

Capturing element nodes which look like variables!?

Subject: Capturing element nodes which look like variables!?
From: "Medina, Edward" <emedina@xxxxxxx>
Date: Tue, 1 Aug 2000 16:08:09 -0400
jeni medina
:Hello!
:
:Been away for a while.  My question is somewhat relating to 
:XML (can't really get away from it too much if I want 
:people to understand what I'm saying), but the focus is on XSL.
:
:I know how to do the template match, and all that neat stuff 
:with normal XML (ie <tag></tag>).  But now after being
:away from DTDs, XML, and XSL for 2 1/2 months I have to write 
:a style sheet for an xml document,  and I'm at a loss 
:on how to match these tags.  (Please bear in mind I did not 
:write the XML)
:
:The XML is written in the following way!
:
:<?xml version="1.0" standalone="yes"?>
:  <dppo:document>
:    <dppo:titleDef>
:    Fiji:  Crisis Over...or is it?
:    </dppo:titleDef>
:      <dppo:packetDef>
:        <dppo:titleDef>
:        Summary
:        </dppo:titleDef>
:        <dppo:paraDef>
:          <dppo:textDef>
:	Hostages held in Parliament since 19 May 2000 were 
:released xxx.  
:	Ratu Josefa Iloilo will be sworn in as Fiji`s new 
:president on Tuesday, 18 July.  
:	Fiji`s two-month political coup is over, but the 
:hostage crisis is a huge disaster for Fiji.  
:	The fabric of multi-culturalism and harmonious race 
:relations has been severely strained.  
:	The economy, which was beginning to show signs of 
:recovery after years of stagnation, is hobbled.	
:          </dppo:textDef>
:        </dppo:paraDef>
:      </dppo:packetDef>
:  </dppo:document>
:
:(Note: These are over simplified stylesheets, without any of 
:the bells and whistles)
:
:I tired doing the following but XSLT looks at it as a variable
:so it wants me to declare it as a variable.
:
:<xsl:stylesheet
:	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
:	version="1.0"
:	xmlns="http://www.w3.org/TR/REC-html40"
:	xmlns:fo="http://www.w3.org/1999/XSL/Format"
:    result-ns="fo">
:
:<xsl:template match="/">
: <HTML>
:     	<HEAD>
:		<TITLE>
:		</TITLE>
:	</HEAD>
: 	<BODY>
:		<xsl:apply-templates />
:	</BODY>
: </HTML>
:</xsl:template>
:
:<xsl:template match="dppo:document">
:		<xsl:apply-templates />
:</xsl:template>
:</xsl:stylesheet>
:
:
:When I do, the text does display however its not really being 
:matched by anything except the variable declaration!
:So the text cannot really be manipulated by the stylesheet 
:just displayed.
:
:<xsl:stylesheet
:	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
:	version="1.0"
:	xmlns="http://www.w3.org/TR/REC-html40"
:	xmlns:fo="http://www.w3.org/1999/XSL/Format"
:    	result-ns="fo"
:	xmlns:dppo="file:/dev/null">
:
:<xsl:template match="/">
: <HTML>
:     	<HEAD>
:		<TITLE>
:		</TITLE>
:	</HEAD>
: 	<BODY>
:		<xsl:apply-templates />
:	</BODY>
: </HTML>
:</xsl:template>
:
:<xsl:template match="dppo:document">
:		<xsl:apply-templates />
:</xsl:template>
:</xsl:stylesheet>
:
:I thought of trying to capture the information as a variable would 
:but I'm not quite sure how to do that.  I began to try the following 
:and was not sure if it would work.
:
:
:<xsl:stylesheet
:	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
:	version="1.0"
:	xmlns="http://www.w3.org/TR/REC-html40"
:	xmlns:fo="http://www.w3.org/1999/XSL/Format"
:    	result-ns="fo"
:	xmlns:dppo="file:/dev/null">
:
:<!-- These are the variables used  -->
:<dppo:document	document="document">
:<dppo:packetDef 	packet="packet">
:<dppo:paraDef 		para="para">
:<dppo:titleDef		title="title">....
:
:If I could get a simple example on how to be able to match these
:XML tags I would greatly appreciate it.  Thanks in advance, and I hope
:that I'm out of the scope of this list.
:
:Thanks again!
:
:Eddy
:


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


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-2011 All Rights Reserved.