XML - Is there a way to use parameters?

Subject: XML - Is there a way to use parameters?
From: "Brian Modreski" <brian -dot- modreski -at- openlogic -dot- com>
To: <techwr-l -at- lists -dot- techwr-l -dot- com>
Date: Tue, 6 Feb 2007 13:58:21 -0700

I think my question may be misleading, because what I am thinking of as
parameters comes from a programming context, not an XML context. Not
only am I not sure how to do this, I'm not sure what the correct
terminology is, so I was hoping someone could point me in the right
direction.



What I would like to do is be able to define an XML entity that can have
a 'parameter' to be filled in when the entity is referenced.

For a really simple example, lets imagine that what I want is something
like this:



<!ENTITY Critter "<![CDATA[The animal: ]]> &animal; <![CDATA[ is a ]]>
&type; <![CDATA[.]]> ">



Which will then be used to display things like:

The animal: cat is a feline.

The animal: eagle is a bird.



So, I want &animal; and &type; to, rather than being entity references,
to be able to dynamically declared, such that I can write something like
this (keeping in mind that I am just inventing syntax here since I don't
know how to do this):

<!ENTITY Dog_desc "&Critter(dog, canine)">



Where the 'dog' and 'canine' will be used to populate the animal and
type references, so I will end up displaying the entity 'Dog_desc' as:



The animal: dog is a canine.



I use the term "parameters", because passing parameters is what I want
to do in programming terms.

Is this possible in XML? I'd appreciate any information.



Brian





Brian Modreski | Technical Writer
brian -dot- modreski -at- openlogic -dot- com



720 240 4531 | phone
720 240 4556 | fax
1 888 OpenLogic | toll free
www.openlogic.com <http://www.openlogic.com/>

OpenLogic, Inc.
Headquarters, Broomfield, Colorado 80021





^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Create HTML or Microsoft Word content and convert to Help file formats or
printed documentation. Features include single source authoring, team authoring,
Web-based technology, and PDF output. http://www.DocToHelp.com/TechwrlList

Now shipping: Help &amp; Manual 4 with RoboHelp(r) import! New editor,
full Unicode support. Create help files, web-based help and PDF in up
to 106 languages with Help &amp; Manual: http://www.helpandmanual.com

---
You are currently subscribed to TECHWR-L as archive -at- infoinfocus -dot- com -dot-

To unsubscribe send a blank email to
techwr-l-unsubscribe -at- lists -dot- techwr-l -dot- com
or visit http://lists.techwr-l.com/mailman/options/techwr-l/archive%40infoinfocus.com


To subscribe, send a blank email to techwr-l-join -at- lists -dot- techwr-l -dot- com

Send administrative questions to admin -at- techwr-l -dot- com -dot- Visit
http://www.techwr-l.com/techwhirl/ for more resources and info.


Follow-Ups:

Previous by Author: RE: Current trends in Authoring Tools?
Next by Author: word numbering best practice question
Previous by Thread: Re: Using Personal Style to win over Interviewers
Next by Thread: Re: XML - Is there a way to use parameters?


What this post helpful? Share it with friends and colleagues:


Sponsored Ads