(Link to AcmlmWiki) Offline: thank ||bass
Register | Login
Views: 13,040,846
Main | Memberlist | Active users | Calendar | Chat | Online users
Ranks | FAQ | ACS | Stats | Color Chart | Search | Photo album
06-16-24 11:35 AM
0 users currently in Programming.
Acmlm's Board - I3 Archive - Programming - XML Questions New poll | |
Add to favorites | Next newer thread | Next older thread
User Post
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6328 days
Last view: 6328 days
Posted on 08-18-06 12:24 AM Link | Quote
Just some simple questions on what all is valid in XML.

1) What's the standard method to putting a < or > in a tag's value, or a quote in an attribute?
2) Does a comment have to have -- after the ! and before the closing >?
3) What characters are valid in tag/attribute names?
4) Are processing instructions (<?blahblah... ?>) allowed after the closing root tag? Eg like so:
<?xml version="1.0" ?>
<blah>
blahblah
</blah>
<?something ?>

[edit]
5) I noticed that when you have something like this:
<blah>
text
<something/>
</blah>
a browser creates a node called "#text" for the word "text" between those two tags. Should this be done when there is only whitespace between them?

Thanks.


(edited by HyperHacker on 08-17-06 11:24 PM)
(edited by HyperHacker on 08-18-06 02:18 AM)
(edited by HyperHacker on 08-18-06 02:19 AM)
Kyoufu Kawa
Intends to keep Rom Hacking in one piece until the end








Since: 11-18-05
From: Catgirl Central Station

Last post: 6327 days
Last view: 6327 days
Posted on 08-18-06 04:10 AM Link | Quote
1) Use entities like ".
2) That is right.
3) Common sense says A-Z, a-z, 0-9 and maybe _ and -.
4) Pass
5) Does it?
MisterJones

Tooky








Since: 12-08-05
From: Mexico

Last post: 6417 days
Last view: 6353 days
Posted on 08-18-06 11:47 AM Link | Quote
1 and 3 could be answered by this: http://www.webreference.com/html/reference/character/isolat1.html#HEAD-1

I don't recall where i read that xml accepts such convention.
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6328 days
Last view: 6328 days
Posted on 08-19-06 03:29 AM Link | Quote
Well I found a few answers by hacking up a javascript to load an XML file and report the name/value of various nodes. Specifically the answer to 2, 4 and 5 is yes. As for #3, any letter (obviously) or number, underscore, dash, and period.

Kawa, I assume you meant like &quot;? This makes sense in a web browser where such things are automatically converted, but I'm writing a general-purpose XML parser and don't intend to create a browser.
HyperHacker

Star Mario
Finally being paid to code in VB! If only I still enjoyed that. <_<
Wii #7182 6487 4198 1828


 





Since: 11-18-05
From: Canada, w00t!
My computer's specs, if anyone gives a damn.
STOP TRUNCATING THIS >8^(

Last post: 6328 days
Last view: 6328 days
Posted on 09-11-06 11:10 PM Link | Quote
Alright, another quick question. How can I embed HTML in an XML document, and have it displayed in the output using XSL? For example:

<note>this is <i>italicized</i> text</note>

I use XSL to display the contents of "note" nicely, but it ignores the HTML within and just displays "this is italicized text". How do I make it treat the contents as an HTML block, and thus actually italicize the text?
If nothing else can I at least put line breaks in somehow? <br /> doesn't work.
sloat



 





Since: 11-18-05
From: Delaware, US

Last post: 6430 days
Last view: 6430 days
Posted on 09-12-06 04:37 PM Link | Quote
You have to define how to show the tag with your stylesheet. Basically, you define an xsl:template block and match "i" (or whatever tag you want to render). In that, you put your html and an 'xsl:value-of select="."' tag

Then, you use xsl:apply-templates instead of xsl:value-of to output, and you should be set.

Hope this helps.
Add to favorites | Next newer thread | Next older thread
Acmlm's Board - I3 Archive - Programming - XML Questions |


ABII

Acmlmboard 1.92.999, 9/17/2006
©2000-2006 Acmlm, Emuz, Blades, Xkeeper

Page rendered in 0.029 seconds; used 375.85 kB (max 459.54 kB)