473,414 Members | 1,989 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Aliases

Please forgive the beginner's question. Is it possible to have two
names for the same element? I am thinking of something like
....
<prob>...</prob>

or

<probability>...</probability>

which would be used interchangeably, with the same syntax and
interpretation of the values. (But of course the start and end tags
would match!)

Ideally I would also not duplicate the innards of these elements. Is
this possible? Acceptable? Useful?
If it makes a difference, I am thinking of w3 XML Schema.

Thanks for any ideas

gus gassmann
Nov 16 '07 #1
5 1760
Gus Gassmann wrote:
Please forgive the beginner's question. Is it possible to have two
names for the same element?
At the XML level, no; those are two different elements.

Of course your Schema could say that both are acceptable and have the
same content, and your application code could treat them as meaning the
same thing, so this may not be a real limitation.

On the other other hand... Generally, that kind of variability for the
sake of variability is NOT a good thing; it complicates things without
really improving usability. So the answer is "possible in practice,
acceptable but usually not desirable, not particularly useful."

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Nov 16 '07 #2
[Elements with identical syntax and semantics, but different names]

Joseph Kesselman :
another solution would be a preprocessing stage (eg an XSLT stylesheet)
Would that be an <xsl:stylesheetor an <xsl:transform? ;-)

--
Johannes
Nov 16 '07 #3
Johannes Baagoe wrote:
Would that be an <xsl:stylesheetor an <xsl:transform? ;-)
Sigh. Chalk up one point for JB... <sigh/I have the impression that
this was a bit of politics over "but if it isn't being used to render
something for viewing, will calling it a stylesheet confuse people"...
and the outcome appears to be, as I suggested, that this bit of extra
flexibility really wasn't necessary after all.

--
Joe Kesselman / Beware the fury of a patient man. -- John Dryden
Nov 16 '07 #4
Joseph Kesselman :

[ <xsl:stylesheetor <xsl:transform? ]
I have the impression that this was a bit of politics over "but if
it isn't being used to render something for viewing, will calling
it a stylesheet confuse people"... and the outcome appears to be,
as I suggested, that this bit of extra flexibility really wasn't
necessary after all.
My impression is that the sightly confusing vocabulary comes from early
days when XSLT and CSS were seen as competing rather than complementary
technologies within the W3C. Those days are over, and since as often as
not, the XSLT I write generates <linkelements to CSS, since most people
associate "stylesheet" with CSS, and since "transform" is both available
and intuitive, I have resolved never to use "stylesheet" for XSLT.

I agree that having two designations for the same concept is more
harmful than helpful. But if one of the two were to be dropped from
some future version of XSLT, I hope it will be "stylesheet". It is quite
hard enough to explain how all that works together without using the same
word for two quite different things, which causes a much greater
difficulty than using two words for the same thing.

--
Johannes Baagoe
Nov 16 '07 #5
* Johannes Baagoe wrote in comp.text.xml:
>My impression is that the sightly confusing vocabulary comes from early
days when XSLT and CSS were seen as competing rather than complementary
technologies within the W3C.
If you look at http://www.w3.org/TR/1998/WD-xsl-19980818 you'll see that
the transformation and formatting components of "XSL" where much less
separate in the beginning than they are now and the split was less clean
than one could have hoped. XSLT and CSS have never been competing, it's
XSL-FO and CSS (or XSLT and XSL-FO vs CSS if you like) who "did" that.
--
Björn Höhrmann · mailto:bj****@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
Nov 17 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Mike Ash | last post by:
I recently had a project dropped into my lap that is written in JSP running on Apache/Resin. A previous version of the application is already running and configured on the production server, but...
0
by: Andrew | last post by:
With command-line interface ( 3.23.37, UNIX Socket ) all is well with column aliasing. However, column aliases disappear in Excel, over ODBC, when there are multiple (joined) tables in the query. ...
5
by: Kevin | last post by:
I'm making my first attempt to put embedded SQL in a visual C++ application and I'm having trouble getting aliases to work. If I try the following SQL query on MS SQL 7.0 it works fine. SELECT...
0
by: Krzysiek | last post by:
Hi all, I have an issue with QSYS\QADBXREF file - it keeps aliases on tables. I take care of an application that works on many places (servers) and on one of them it's not possible to create...
22
by: mp | last post by:
i have a python program which attempts to call 'cls' but fails: sh: line 1: cls: command not found i tried creating an alias from cls to clear in .profile, .cshrc, and /etc/profile, but none...
15
by: jacob navia | last post by:
Recently, we had a very heated thread about GC with the usual arguments (for, cons, etc) being exchanged. In one of those threads, we came into the realloc problem. What is the realloc...
22
by: Daniel Rucareanu | last post by:
I have the following script: function Test(){} Test.F = function(){} Test.F.FF = function(){} Test.F.FF.FFF = function(){} Test.F.FF.FFF.FFFF = function(){} //var alias = function(){}; var...
11
by: Chris Thomasson | last post by:
I was thinking of how I was going to create a robust versioning system in Standard C++ for my library and was wondering exactly what the point of a namespace alias is? The seem like a rather...
1
by: drexcol | last post by:
I am a php newbie and am trying to write a script that will direct visitors to specific pages on my website based on which of several url’s they have entered (all are aliases of the main website)....
6
by: dom.k.black | last post by:
Is it still common practice to use type aliases (INT, PCHAR etc). It looks ugly and breaks the syntax highlighting, are there any advantages these days (MSVC++6.0 and later)? I could understand...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.