RE: [xsl] Templates

Subject: RE: [xsl] Templates
From: "SINGH Navpreet" <Navpreet.SINGH@xxxxxxxxx>
Date: Thu, 6 Sep 2007 13:17:19 +1000
Hi,
I was given this DTD to write xsl. XML document has not been provided
yet. I have to use Element name as heading and the text() as text
against that heading. So xml could be as follows:

<?xml version="1.0" encoding="UTF-8"?>
<PAGE>
	<TITLE>PAGE10</TITLE>
	<PARA0>
		<TITLE>PARA0 123</TITLE>
		<CAUTION>
			<PARA>Just a CAUTION</PARA>
		</CAUTION>
		<NOTE>
			<PARA>Very important note.</PARA>
		</NOTE>
		<PARA>TESTING DATA</PARA>
		<NOTE>
			<PARA>TESTING NOTE AFTER PARA</PARA>
		</NOTE>
		<SUBPARA1>
			<PARA>This is subpara1</PARA>
		</SUBPARA1>
	</PARA0>
</PAGE>

OTPUT should be as follows:

PAGE10
PARA0 123

CAUTION: Just a CAUTION

NOTE: Very important note.

TESTING DATA

NOTE: TESTING NOTE AFTER PARA

This is subpara1.


I am not sure how to implement, "( (NOTE+, (PARA, NOTE*)?) | (PARA,
NOTE*))?" out of "(TITLE, WARNING*, CAUTION*, ( (NOTE+, (PARA, NOTE*)?)
| (PARA, NOTE*))?, SUBPARA1*, REFITEM*)". Give it a try.

Thanks,
Navpreet.

-----Original Message-----
From: XSL-List Owner [mailto:xsl-list-owner@xxxxxxxxxxxxxxxxxxxxxx]
Sent: Thursday, 6 September 2007 11:01 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re: [xsl] Templates

You will improve the chances that you will receive prompt and helpful
responses on XSL-List by:

   - asking specific enough questions that answers are possible.
Describe
     what you are trying to do, how you approached it, what happened,
and
     why you don't like the result you got

   - supplying small samples of files that illustrate your question or
     problem. For example, an XML file, an XSLT stylesheet, the result
     you got, and the result you want - all in miniature (and
remembering
     that everything posted to XSL-List is archived in public)

   - describing the topic of your question concisely in the subject line
     Good subject lines - those that describe the subject matter of your
     message - not only increase the chances that you will receive
answers
     to questions or responses to comments, they also make your message
     and any replies to it accessible in the list archives.


While I'm sure there are people on XSL-List who will try to guess
what your question is about, you have really not provided enough
information to make it easy to help you. Please re-submit your
question with the samples described above.

-- Tommie


At 10:33 AM +1000 9/6/07, SINGH Navpreet wrote:
>Hi All,
>
>I have following DTD for Element PARA0
>
>
>
>(TITLE, WARNING*, CAUTION*, ( (NOTE+, (PARA, NOTE*)?) | (PARA, NOTE*)
>)?, SUBPARA1*, REFITEM*)
>
>
>
>I am writing xslt to transform my xml document with this PARA0 element.
>I am applying templates for TITLE, WARNING*, CAUTION*, SUBPARA1*,
>REFITEM*. These are quite straight forward, but I am struggling to
write
>a template that can handle  ( (NOTE+, (PARA, NOTE*)?) | (PARA, NOTE*)
)?
>part of the DTD. Can anyone help me with this.
>
>
>
>Thanks,
>
>Navpreet.


--

======================================================================
B. Tommie Usdin                        mailto:btusdin@xxxxxxxxxxxxxxxx
Mulberry Technologies, Inc.                http://www.mulberrytech.com
17 West Jefferson Street                           Phone: 301/315-9631
Suite 207                                    Direct Line: 301/315-9634
Rockville, MD  20850                                 Fax: 301/315-8285
----------------------------------------------------------------------
   Mulberry Technologies: A Consultancy Specializing in XML and SGML
======================================================================


Disclaimer :
The contents of this e-mail including any attachments are intended only
for the person or entity to which this e-mail is addressed.  If you are not,
or believe you may not be, the intended recipient, please advise the sender
immediately by return e-mail, delete this e-mail and destroy any copies.
Tenix does not warrant nor guarantee that this email communication is free
from errors, virus, interception or interference.

Current Thread