Jump to content
Eternal Lands Official Forums
Sign in to follow this  
Quinticus

XML format

Recommended Posts

I'll go ahead and start proofreading this one along with the others (if there are any). Whilst i'm doing that, though, i'm going to put this into XML format to the best of my ability. Could someone with a little more experience double check that i am doing this right? Below you'll find the prologue in XML. Not sure i'm doing it right.

 

<?xml version="1.0" encoding="UTF-8" ?>

<document xmlns="http://www.eternal-lands.com/xmlns/Storylines/A'>http://www.eternal-lands.com/xmlns/Storylines/A History of the Lands" xmlns:m="http://www.eternal-lands.com/xmlns/Storylines/A History of the Lands" version="0.0.1">

<title>A History of the Lands</title>

<author>Saii</author>

<chapter>

<title>Prologue</title>

<text>

<para>It began in darkness, and ended in light, which is all that is certain in the forming of the world. No-one is sure how, or when, and most importantly why we are here, and with all the dangers we face who has the time to try and answer these questions? Certainly not the Warrior, nor the Miner, Alchemist, Mage or Smith.[<- Fragment]</para>

<para>All we know of the times we live in and what went before are the stories our elders tell, and the histories we believe to be true. The old tales differ for every race, across each island and every different village. We will never know the absolute truth of these things, we can only guess from the common threads of each confused and conflicted tale, and these become yet more muddied for every passing day our times remain unchronicled.</para>

<para>This work is a tome recording our civilisation [civilization], collected to safeguard the knowledge of our forefathers. It is the finest work of the six races, a testament to their glories, their failures, and their Eternal Lands.</para>

<subtitle> The Gods, and the creation of the world </subtitle>

<para>It is perhaps only fitting that our earliest and most accurate tales can be traced to the great forest abodes of the Elves. They tell of a great birth of life in a time beyond their reckoning. Their legends speak of seven Gods, different in form as in thought, who for time without end had debated existence and reason. Aluwen the creator, Elandria the preserver, Zarin the joyous, Dvar the maker, Glydoc the defender, Centau the changer and Mortos - the end of all things. Endless conversations resolved only that their first purpose should be creation - the making of a world in which to ground their theories and test assumptions.</para>

<para>They began in harmony, placing the ground beneath and the sky above, giving boundaries to the perception of all who would live there. They created inert plant and active animal, to provide the concept of time both moving and still. They created Sea, Sun and Moon, to balance the smallness of things with a greatness of concept. And they created the races, wrought in their own image, yet becoming more separate as their labours split every agreement regarding creation.</para>

<subsectiontitle>Creation of the Dragons and Elves</subsectiontitle>

<para>Aluwen, ever the innovator and bringer of life, began first to give intellect to her creations. For all the world's beauty she felt something was missing. Thus she created the first sentient being to roam Eternal-Lands, a serpentine soul at home in all elements, capable of reaching to the intellectual heights of the Gods themselves. She named this, the first of its kind, Dragon.</para>

<para>The Dragon was a gorgeous creature. Her long graceful body and vast wings seemed to shine brightly over and complement exquisitely the beauty of the lands themselves. She was made of every hue, but would ever take a form best suited to where she found herself. Zarin, taken with the creature's joyous form, blessed her with the individual name Kaysel, which means "Rainbow".</para>

<para>Aluwen, with the consent of the other gods, blessed Kaysel, and from her two children were born - the black Dragon Iringold (meaning Jet), father of the Draegoni, and the white Dragon Vias (meaning Pearl), keeper of souls.</para>

<para>But Kaysel was not to share in her child's upbringing for long. Her position as the firstborn of all the God's creations meant she could never truly be a creature of the Lands, and as Kaysel grew, she was persuaded by Aluwen that she must let him live without her. Kaysel was gifted with Eternal life, and she remained hidden, watching her beloved child as he learned of the world and the creatures in it.</para>

<para>The independence of the two Dragons gave Aluwen great joy, but also sadness, as they, mighty but wilful [willful] adolescents, often concentrated on their own growth rather than on the lands. Desperate to see the world populated by something that would be more bound to the earth of creation, she placed Elves upon the land, wingless.</para>

<para>She gave her second race long life so they might study the Gods' earliest works the better. As this race also grew and began to crave independence, their gathering wisdom and the influence of Aluwen gave them a deep love of everything that lives. They over all the other races give most thanks to their God, appreciating the great wonder of the world they have been given.</para>

</text>

</chapter>

 

Also, mistakes are highlighted/corrected in brackets.

Edited by Quinticus

Share this post


Link to post
Share on other sites

I've put the current version through my BookMaker,

 

<edit>Tripod doesn't like the direct link. So go Here and select 'History' (currently the only link anyway)

 

I did a text copy/paste, so bold/underline/etc is lost, though in the case of titles, that shouldn't be a problem

Edited by Quinticus

Share this post


Link to post
Share on other sites

I noticed that there was an error on the page. Not sure if that was intentional or not ttlanhil.

 

Great work...i'll get a couple of stories together to see how it all works out!

 

Also, there's supposed to be text tags around every paragraph?

 

Not sure myself, i just want to make sure i have things straight.

Share this post


Link to post
Share on other sites
I noticed that there was an error on the page.  Not sure if that was intentional or not ttlanhil.

 

Great work...i'll get a couple of stories together to see how it all works out!

 

Also, there's supposed to be text tags around every paragraph?

 

Not sure myself, i just want to make sure i have things straight.

162838[/snapback]

 

 

 

If there's an error, I'd like to catch it, unless it's a spelling one in the test itself (I just copy/pasted in slabs), where abouts is it?

as for text/para split stuff, I dunno, it just seems close to what was in the encyclopedia example, so I went with that

Share this post


Link to post
Share on other sites

Uh... why is there a text tag around every paragraph? lol, just put text tags at the end of the text area...

BTW, that's what's in the example ;)

Share this post


Link to post
Share on other sites
If there's an error, I'd like to catch it, unless it's a spelling one in the test itself (I just copy/pasted in slabs), where abouts is it?

as for text/para split stuff, I dunno, it just seems close to what was in the encyclopedia example, so I went with that

162841[/snapback]

 

it shows up at the bottom of the page for me.

 

An invalid character was found in text content. Error processing resource 'http://ttlanhil.tripod.com/EL/history.xml'. Lin...

 

</para></text><text><para>Voting was heavily split, but down unexpected lines. Mortos abandoned his ...

 

thanks for clearing it up CK

Share this post


Link to post
Share on other sites
it shows up at the bottom of the page for me.

thanks for clearing it up CK

162847[/snapback]

The one CK refered to? If so, I just found out what that problem is, the original text had characters beyond ASCII (as in, not normal letters), that's the issue. not sure what the right solution here is, probably convert them back to ASCII... unless EL will be able to handle those characters, any developers able to let me know?

 

Uh... why is there a text tag around every paragraph? lol, just put text tags at the end of the text area...

BTW, that's what's in the example ;)

162844[/snapback]

erm... uhh... because I goofed, probably. I'll get that fixed up shortly, thanks

 

<edit>

yeah, I goofed, but not where I thought... I set it up so one newline means new <para>, two means a new <text>... then bright me forgot about that when copy/pasting...

 

the current list of chapter/section things is probably a bit safer to use, but a lot more work to copy paste...

the alternative is one long area to paste it all, but then the person writing it up has to put in commands like <title> or <section> and such... which would be prefered?

Edited by ttlanhil

Share this post


Link to post
Share on other sites

Not sure about it then, i probably don't know what i'm talking about. ;)

 

I tried moving these posts and splitting this topic. However, it said i wasn't allowed to do that. I'm not sure if i'm doing it right, or if don't have the clearance. Lyanna, if you could, please splice these posts out to a separate thread so we can keep this one clean. Also...how do i do that so i don't have to bother you. :o

Share this post


Link to post
Share on other sites

okay, I updated the tool, should be one external change a lot of internal ones.

External change: anything in extended ascii is now 'shrunk' back to the normal alphabet.

Internal: lotsa little changes, should make it easier to modify and update

 

also, another issue... In Saii's story, there's use of underlines, bold, etc... is there support for this in the XML? and tables(especially useful for diary type stuff, dates in one column, entries int he other)?

Share this post


Link to post
Share on other sites

It's been updated again, there's now a more free-form input option.

Currently you can only use chapters, no sections, but there's no need for repetative copy'n'paste into multiple boxes.

Share this post


Link to post
Share on other sites
also, another issue... In Saii's story, there's use of underlines, bold, etc... is there support for this in the XML? and tables(especially useful for diary type stuff, dates in one column, entries int he other)?

162871[/snapback]

No - the format is about semantics, and removing bold, colors, etc. was the reason for a new format. Though, tags such as footnote, etc. can possibly be added in the future.

Edited by crusadingknight

Share this post


Link to post
Share on other sites
No - the format is about semantics, and removing bold, colors, etc. was the reason for a new format. Though, tags such as footnote, etc. can possibly be added in the future.

163702[/snapback]

Okay, thanks, I've put a notice about that on the front page.

 

One more issue, where should the document `xmlns' and `xmlns:m' tags point to? the current examples in the encylopedia, for now?

Share this post


Link to post
Share on other sites

The namespace is wrong. Please use the namespaces exactly like shown in the examples. The transformation will fail if you don't. Please don't get confused by "encyclopedia" in the namespace name, this is because the format initially was intended for encyclopedia only. The version number is the format version, not the content version, so please use version number 0.9.3 for the format you are using above. This number is used in order be able to automatically convert your file to a new version of the format using an XSLT script.

 

With regards

Lachesis

Share this post


Link to post
Share on other sites
The namespace is wrong. Please use the namespaces exactly like shown in the examples. The transformation will fail if you don't. Please don't get confused by "encyclopedia" in the namespace name, this is because the format initially was intended for encyclopedia only. The version number is the format version, not the content version, so please use version number 0.9.3 for the format you are using above. This number is used in order be able to automatically convert your file to a new version of the format using an XSLT script.

 

With regards

Lachesis

164102[/snapback]

I've changed it so the version number is set, all the rest looks the same as the example to me (except whitespace/newline and such).

Was this the only issue?

 

the example here has been updated <text>

Edited by ttlanhil

Share this post


Link to post
Share on other sites

Unfortunately, no, I have just found another thing. Subtitles are not supported. You have to use a structure like

 

<chapter>

<title></title>

<section>

<title></title>

</section>

</chapter>

 

Additionally, you can either have text or (sub)sections in a chpter (section), but not both. For introductions, please either create a (sub)section with the title "Introduction" or use the abstract tag. The abstract may not contain para elements though, so you can only have one paragraph in the abstract. You may want to have a look at the example file (choose the most up to date revision please) for further details.

 

With regards

Lachesis

Edited by Lachesis

Share this post


Link to post
Share on other sites
Unfortunately, no, I have just found another thing. Subtitles are not supported.

Yes, that was quinticus' post, I have <section><title> in mine, which is long so linked instead of posted

Additionally, you can either have text or (sub)sections in a chpter (section), but not both.

My tool doesn't enforce this yet, it's done in documentation rather than code :ph34r:

For introductions, please either create a (sub)section with the title "Introduction" or use the abstract tag.

I've done this when converting Saii's work for the example

The abstract may not contain para elements though, so you can only have one paragraph in the abstract.

With regards

Lachesis

164349[/snapback]

Currently, newlines in the abstract area just end up staying as newlines. Not sure if I should make them a new sentance within the Abstract, or maybe show a warning.

I'll probably go with the warnings, once I put in more validation/checking

Share this post


Link to post
Share on other sites

I don't know your tool, but please note that the display code won't care for newlines. You can use newlines to format the source code, but any whitespace between text will work exactly like a single space, and whitespace nodes will be stripped completely where no text is permitted. I'm quite sure for this use we'll soon need additional format extensions (for poems for instance). Unfortunately I was never informed that it is already used outside encyclopedia (pokes CK).

Share this post


Link to post
Share on other sites

Ah, Lachesis... since you've visited, I might as well ask you now. :ph34r: What are the graphics options for the book displays? Is it possible to show things like torn pages, stains, maps, diagrams, illustrations, etc.? Is there any artwork (or anyone willing to do the artwork) for that?

 

-Lyn-

Share this post


Link to post
Share on other sites

Hi Lyanna, well I never expected that this format would be used for any complex books that soon except for encyclopedia. I talked to Wytter and we agreed to try to merge the code for books with the new encyclopedia code once it is done. I actually accidentally stepped over this use, and of course I'll try to put new features for ordinary books into it now. Though it is already usable, it is quite limited so far, as you can see in the documentation in the example file. You can use diagrams and illustrations using the image feature. I'm not sure what you are thinking of when mentioning maps. The other features are very difficult because the final appearance of a book depends on many procession steps and is actually not controllable in the source files by intent. Stains and torn pages thus might not look as expected.

Share this post


Link to post
Share on other sites
You can use diagrams and illustrations using the image feature. I'm not sure what you are thinking of when mentioning maps. The other features are very difficult because the final appearance of a book depends on many procession steps and is actually not controllable in the source files by intent. Stains and torn pages thus might not look as expected.

164403[/snapback]

 

Would it be possible to use images as backgrounds? A torn or stained page will just be backgrounds for text to be placed upon them. Like this example of a stained page:

 

stained-parchment.jpg

Edited by Derin

Share this post


Link to post
Share on other sites

I thought you were talking about stains that hide text or torn pages that cut the text. Background images would not be difficult. Currently, only the two backgrounds provided by Wytter are used, I'll make the visual format more flexible then. Just add your backgrounds to the textures directory* and add an image definition to textures/imagedef.xml*. The height and width you provide there will become the size of the window (unless you specify double-page display).

 

You do not need to change your source documents for this, such visual effects will be created by separate XSLT stylesheets for your books. Most of the stuff in encyclopedia.xsl is not needed by "normal" books so they will look much simpler and you will probably be able to change minor things such as background images even without any knowledge of XSLT.

 

You will probably also need extensions to the semantic format, for instance maybe tags for songs/poems (and their verses). If you encounter any, please request them immediately as these will directly affect the source documents that are currently written.

 

 

With regards

Lachesis

 

*) on freepository, please see Encyclopedia forum

Edited by Lachesis

Share this post


Link to post
Share on other sites

Great!

 

I can easily make a few pages similar to the one I made as an example.

What format do they have to be in? BMP 8-bit?

 

 

Lyanna, is that what you were asking for? images as backgrounds?

Share this post


Link to post
Share on other sites

I can use both. Stains on top of words would be nice... but I suppose if we were really clever, there would be a way of arranging the word-wrap so that it SEEMS as though the words are buried by a stain that's actually in the background. Rips and tears can work in the same way too. Great job on the artwork, Derin! :( Make more... lots more!

 

-Lyn-

Share this post


Link to post
Share on other sites

For now, yes, Derin. Other formats may be supported later. One day ;-)

 

Lyanna, the word wrapping is done in the client and depends on the locale and default font size the player chooses. However I think it could be possible to create a stain texture that is then rendered at the final position of a piece of text enclosed by a stain tag. Torn pages are much harder because not only is it complicated to define what portion of the text shall be hidden by the tear, but also it cannot be moved with reewrapped text in a sane manner.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×