RE: Ignore childs

Subject: RE: Ignore childs
From: "Richard Lander" <rlander@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 10 Mar 2000 09:48:32 -0500
 Marta,

I use a very similar setup in my documents, but one that works slightly
differently. I'll illustrate:

<title>This is the title with the acronym <acronym id="xml"/></title>

and then in a glossary section at the end of the document, which you can
supress or display, I have a bunch of:

             <def-acronym id="xml">
                 <acronym>XML</acronym>
                 <expansion>eXtensible Markup Language</expansion>
		     <description>XML is a greal conversation starter ...</description>
             </def-acronym>

Why do I use this approach?

Mainly because the acronmym definition is only stored once. If you want to
change 'eXtensible Markup Language' to 'Extensible Markup Language', you
only have to make 1 change, in the glossary section. This difference makes
authoring much easier.

You can choose, in your XSLT, to use either the short or long version or the
acronym to replace <acronym id="xml"/>. If you want, you could use the long
one for the first instance and the short one for all others.

Then again, if you are stuck with the DTD or do not like this approach, then
the other suggestions work well. In my system, the acronym is linked, and
when clicked on pops up a javascript alert box that contains that acronym
name and a description. I am working on replacing the alert box with a nice
mini-window, but the problems are still the same. I use normalize-space() to
avoid 'unterminated string constant'. This problem prevents direct viewing
with IE5. XT, or the like, must be used first to normalize-space() (convert
to HTML too, maybe) before the document can be viewed in IE5.

Good luck,

Richard




-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Marta Lobato
Sent: Friday, March 10, 2000 6:52 AM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Ignore childs


Hello,

I would be so grateful if you could help me.

I have the following XML file:

   <section>
     <title>This is the title with the acronym
             <def-acronym>
                 <acronym>XML</acronym>
                 <expansion>eXtensible Markup Language</expansion>
             </def-acronym>
     </title>
     <par>Content of the section</par>
   </section>

And I want this output:

    This is the title with the acronym XML

I am writing the style sheet with

    <xsl:value-of select="title"/>

And I get:

This is the title with the acronym
XML
eXtensible Markup Language

I do not want the expansion but I don't want the title in more than one
lines because this is the parameter for a javascript function and it
says "unterminated string constant".  I need it in the same line.

Any suggestions?  Thank you.

  Marta Lobato.


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


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


Current Thread