TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
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
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 & 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 & Manual: http://www.helpandmanual.com
---
You are currently subscribed to TECHWR-L as archive -at- infoinfocus -dot- com -dot-