[Lexicog] Re: Tshwanelex DTD Tree
David Joffe
david.joffe at TSHWANEDJE.COM
Wed Sep 23 23:39:32 UTC 2009
Hi Loig,
Just briefly (sorry, been very busy) ...
> Another question :
>
> Is it possible to avoid that my elements are sorted automatically?
> For example, I want to write 2 or 3 variants in a row, with the source
> just after each of them, and then the translation, but the software only
> allows this order : Phonetic Example, Source, Orthographic Example,
> Translation. If I add an example and its source, I get this order:
> Example, Example, Source, Source, Translation...
> Is it possible to put these elements in the order I want within the
> "Example" branch of my tree ?
So you mean you want e.g.:
Example, Source, Example, Source?
with the first source 'belonging to' the first example and the
second 'belonging to' the second example? If I understand correctly,
then yes, there are at least two ways; the first (and more
'correct') way is to group things that belong together into further
sub-element groupings --- this is more 'correct' because it
explicitly encodes into the data what 'belongs to' what. So for
example you could have something like:
UsageExample
|__TheExampleItself
|__Source
UsageExample
|__TheExampleItself
|__Source
The second way, which you asked about before, relates to allowing
more 'free-form' arrangements ... for this you must use the "4.1"
TshwaneLex version available lower down the page on
http://tshwanedje.com/tshwanelex/v4/, and then select the 'PCDATA'
checkbox in the DTD editor on the element that will be the parent of
the Example and Source etc. elements ... in accordance with the XML
standard, when an element allows PCDATA, the child elements can then
be moved in any order relative to one another (their default
position however would still not be in the best place for your
scenario, but we plan to soon add an option to have them add by
default at the end).
There are one or two other ways, but personally I'd go for the first
one.
Note though that in the TshwaneLex default DTD i.e. default
'structure', what you ask is already possible, but it's done via
attributes rather than child elements, meaning the limitation is
that you can only have one 'example' and one 'source' per usage
example element, e.g.:
Example element 1 [Example attribute, Source attribute]
Example element 2 [Example attribute, Translation attribute, Source
attribute]
etc.
- David
---
TshwaneDJe Dictionary Production Solutions
Follow our news via http://tshwanedje.blogspot.com/ or
http://twitter.com/tshwanedje
------------------------------------
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/lexicographylist/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/lexicographylist/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:lexicographylist-digest at yahoogroups.com
mailto:lexicographylist-fullfeatured at yahoogroups.com
<*> To unsubscribe from this group, send an email to:
lexicographylist-unsubscribe at yahoogroups.com
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
More information about the Lexicography
mailing list