|
-
Feb 15th, 2002, 12:48 PM
#1
Thread Starter
Member
You may well have to declare those characters as entities.
Not sure but there may also be a character set issue in the xml directive at the top of the file.
-
Feb 21st, 2002, 04:57 AM
#2
Hyperactive Member
-
Feb 21st, 2002, 05:20 AM
#3
Thread Starter
Member
Have a look here:
http://www.xml.com/pub/a/2001/01/31/qanda.html
Found from doing a search on Google: entities special characters xml
Are those characters part of the standard ASCII character set?
Dave
-
Feb 21st, 2002, 05:30 AM
#4
Hyperactive Member
-
Feb 21st, 2002, 05:54 AM
#5
Thread Starter
Member
Yes that's right you need to declare them in a DTD (DOCTYPE element).
I suggest you take a few hours out to learn about DTDs, they really are quite simple. Don't think of XML as anything other than self-describing data (in markup form).
I learnt about DTDs a while back - just starting on Schemas. Take a look here:
http://www.xml101.com/dtd/default.asp
And here:
http://lists.w3.org/Archives/Public/...1Jul/0057.html
It would imply you can use a combination of schema and DTD.
I imagine this is the way you will accomplish what you are trying to do.
-
Feb 21st, 2002, 06:10 AM
#6
Hyperactive Member
-
Feb 21st, 2002, 06:46 AM
#7
Thread Starter
Member
Entity declarations are a kind of variable, so you can reference any string (could be a standard footer or disclaimer) with another (much shorter or more convenient) one i.e.
<?xml version="1.0"?>
<!-- Internal DTD Subset-->
<!DOCTYPE page [
<!ENTITY disclaimer "We are not responsible for the content of this page in any way">
]>
<!--DTD end-->
<page>
<content>Blah Blah Blah</content>
<disclaim>&disclaimer;</disclaim>
</page>
So you might implement something like:
<?xml version="1.0"?>
<!-- Internal DTD Subset-->
<!DOCTYPE juddspage [
<!ENTITY degrees "ø">
<!ENTITY slash "/">
]>
<!--DTD end-->
<juddspage>
<Unit External="kW&slash;°rees;C" Internal="kW&slash;°rees;C" Zero="0." Scale="1." Offset="0.">kW&slash;°rees;C :: kW&slash;°rees;C</Unit>
</juddspage>
-
Feb 21st, 2002, 06:59 AM
#8
Hyperactive Member
-
Feb 21st, 2002, 08:44 AM
#9
Thread Starter
Member
Even & and / are invalid characters and have to defined by their ASCII Character codes, although in the case of >, <, & etc. the XML equivalents. & will do fine.
Thinking logically about it, I'm not so sure the parser doesn't like the special characters, could it be objecting to the "/" s before them?
Dave
-
Feb 22nd, 2002, 05:26 AM
#10
Hyperactive Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|