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

RE: Creating HTML tags through XSL.

  • From: prasadm@c...
  • To: tpassin@i..., xml-dev@i...
  • Date: Mon, 31 Jan 2000 10:30:28 -0600

create tag
Hi,

Thanks for your time. I have tried what you have suggested and that works
fine.
But what I am trying to do is.

<xsl:template match="ROW">
  <xsl:choose>
  <xsl:when test="position()=0">
	<TABLE BORDER="0"/>
	 <xsl:apply-templates/>
  </xsl:when>
  <xsl:when test="position() div 10 = 1">
	</TABLE/>           			
  </xsl:when>
  <xsl:otherwise>
	<xsl:apply-templates/>
  </xsl:otherwise>
  </xsl:choose>
</xsl:template>

Since the parser was giving an error on the </TABLE/> line, I tried using
&lt;/TABLE/&gt;
but this tag would appear on the browser rather than being interpreted as a
markup.
Is there any other way of accomplishing this, I wanted to know.

Thanks in advance for the help.

Another simple question, is it possible to add a node in an XML document at
some reqular intervals.
like. For eg: Say, I have a XML doc. with 400 rows. I want to insert a
<LAYER></LAYER>
tag between every 20 documents. The XML doc. after the insertion should look
like this.

<ROWSET>
<LAYER num="1">
<ROW id="1">
......
</ROW>
<ROW id="2">
......
</ROW>
<ROW id="3">
......
</ROW>
....
...
<ROW id="20">
......
</ROW>
</LAYER>
<LAYER num="2">
....
.....
</LAYER>
</ROWSET>

How can this be done? If anyone has a sample code, it would
be helpful. 


-- Prasad


> -----Original Message-----
> From:	THOMAS PASSIN [SMTP:tpassin@i...]
> Sent:	Friday, January 28, 2000 7:25 PM
> To:	prasadm@c...; xml-dev@i...
> Subject:	Re: Creating HTML tags through XSL.
> 
> <prasadm@c...> wrote
> 
> > Hi folks,
> >
> > Asking for help once again. Has anyone been successful in creating HTML
> > tags through XSL. What really my problem is we have an XML document of
> > say 100 records. Now I want to split them up into 10 layers/div's
> containing
> > 10 rows
> > in each page. I want to create something like this.
> >
> > <xsl:template match="ROW">
> >     &lt; /TABLE &gt;
> >     &lt; /FORM &gt;
> > <xsl:apply-templates/>
> > </xsl:template>
> >
> > The above XSL should generate for me the tags
> > </TABLE></FORM> as part of the html doc being created. But instead
> > these tags appear on the browser. Is there anyway to force these tags
> > to be part of the html doc. or Is it not possible at all?
> >
> If you use the entities &lt; and so on, you will get those CHARACTERS (not
> markup) in the output.  But they will be excaped characters, not markup,
> as
> you have seen.
> If you want to output a table element, you need to output  complete
> elements, possibly like this:
> 
> <xsl:template match="ROW">
> <table><form><xsl:apply-templates/></form</table>
> </xsl:template>
> 
> There are other possiblities, but this is the easiest.
> 
> Tom Passin
> 
> 
> xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
> Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN
> 981-02-3594-1
> Unsubscribe by posting to majordom@i... the message
> unsubscribe xml-dev  (or)
> unsubscribe xml-dev your-subscribed-email@your-subscribed-address
> 
> Please note: New list subscriptions now closed in preparation for transfer
> to OASIS.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ or CD-ROM/ISBN 981-02-3594-1
Please note: New list subscriptions and unsubscriptions
are  now ***CLOSED*** in preparation for list transfer to OASIS.



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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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