EQInterface Forums

EQInterface Forums (http://www.eqinterface.com/forums/index.php)
-   General authoring help / discussion (http://www.eqinterface.com/forums/forumdisplay.php?f=12)
-   -   Newline in text? (http://www.eqinterface.com/forums/showthread.php?t=1236)

Kraegar 08-19-2002 12:53 PM

Newline in text?
 
Sorry for cross-posting forums, but I just realized this belongs here.

Trying to use the StaticText piece to place some text, want to know if there's a way to force a newline? Basically what I'm seeing is this:

Test Test Test Test

When what I want is:

Test
Test
Test
Test

Any suggestions? I can post code, if that would help.

Thanks

Pini Uldar 08-19-2002 03:11 PM

Have you tried turning autowrap on and then using the size to cause the carriage return? I don't know of a way to put carriage returns into the text directly. Maybe it's HTML and you can use BR somehow?

- Pini

Kraegar 08-19-2002 03:14 PM

br tags didn't work.

I have wrapping on, but depending on the resolution you run the ui at sometimes things look really bad.

UniDyne 08-19-2002 03:17 PM

If the XML used is fully compliant, you should be able to use

Code:
<text><!CDATA[[Test Test Test Test]]></text>


The <!CDATA[[ ]]> is what forces XML to recognize characters as preformatted text and include extra whitespace including carriage returns.

If this works let me know! ;)

Kraegar 08-19-2002 03:23 PM

I'll definitely test that when I get home....

Pini Uldar 08-19-2002 03:24 PM

Definitely report back please too if it works. I didn't think about wrapping it in CDATA.

- Pini

Kraegar 08-19-2002 07:12 PM

Didn't work at all...

Looked up CDATA on the web, format should be <![CDATA[

blah

]]>

Still looking for a new solution.

UniDyne 08-19-2002 07:15 PM

Okay, that just confirms my suspicions(sp?). EQ apparently does not use a standard XML parser. I kind of figured that since the language definition is a reference to another XML file rather than a DTD. Something to post under bugs and wish list I guess...

Gendal 08-20-2002 02:11 AM

Well technically the other Xml file is a schema, not a dtd. It is however not any standard schema that I can determine, though it is very close to the XDR specification. I love how they indicate namespaces, its almost comical in that they almost, but not quite grasped how namespaces should work (not that I am an expert by anymeans).

Then again I am probably being too harsh, they probably started sidl before even preliminary specifications on Schema 1.0 was released. Wierd how it almost matches XDR though?

EQ definatly does not enforce the entire Xml specification as put forth by the w3c. They allow all kinds of things that a strict xml parser would not, like not requiring the <?xml 1.0 ?> tag at the beginning, etc.

guice 08-20-2002 04:58 AM

Quote:
They allow all kinds of things that a strict xml parser would not, like not requiring the <?xml 1.0 ?> tag at the beginning, etc.


LOL .. Which is exaclty what XML isn't about.

XML was designed to be strict and to enforce contraints over data to make it uniform across the board.

It's not like HTML where every browser and it's brother is making their own new tags.

XML needs to be strict and I don't like how companies go out and start making their own rules.


Oh, and the SIDL.xml is an attempt at a Schema, an invalid and small attempt, but an attempt none the less.

Gendal 08-20-2002 02:34 PM

Several authors on this board (like the popular vert mod) are posting mods that cause my xml parser to choke because they put comments before the <?xml?> start tag.

I don't know whether to be a hard ass and throw an error and tell them "fix this or I won't load it" or try and read the file again and just start reading from the <?xml?> tag. Thinking I am going to be a hardass, even though EQ allows it.

Then again that's not very user friendly. sigh.

Kraegar 08-20-2002 03:08 PM

XML, the Extensible Markup language. It's made to be extended - new tags are supposed to be created. However, they're supposed to follow the rules - and eq's don't.

UniDyne 08-20-2002 03:16 PM

The non-standard XML is what's stopping me from writing an editor. (That and my lack of time at the moment.) I wish VI would go ahead and work on the UI to get it in a state where it is more or less stable and done so that they can publish a real schema or DTD.

If and when they do, it shouldn't be much of a problem to write good editors for SIDL.

Gendal 08-20-2002 03:42 PM

When I first started working with sidl I actually made a xsl transformation to produce a Schema 1.0 xsd from the mock schema that is SIDL.xml. However I took the path that inherited objects are defined by complex types, and it seems elements who inherit a complex type's are limited to either sequential or choice complexContent, which of course eq doesn't use. Why in the hell I can't use the all ordering scheme I don't know, but it basically makes the produced schema useless. /rude schema 1.0.

If anybody else has any ideas for creating an xsd based around sidl.xml I would love to hear em (and if you want to see the xsl or produced xsd just ask). For now I have just given up on using a validating xml parser, my object layer throws errors as necessary anyways, just be a nicety to see what's wrong ahead of time while reading the document.

UniDyne 08-20-2002 06:39 PM

Interesting. I'd like to see the XSL and XSD. The ordering thing is a bit strange.


All times are GMT -5. The time now is 09:47 PM.

vBulletin Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.