XML Elves

XML Elves

<community>of XML and SVG Developers</community>


Case Sensitive Element names in SVG

This is a discussion on Case Sensitive Element names in SVG within the SVG Questions forums, part of the SVG Forums category; I have the task of creating an XML Schema for our SVG images. I ran into a problem with the ...


Go Back   XML Elves > SVG Forums > SVG Questions

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices


Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-09-2004, 08:42 AM
arthur
Guest
 
Posts: n/a
Default Case Sensitive Element names in SVG

I have the task of creating an XML Schema for our SVG images.
I ran into a problem with the Department Of the Navy (DON) imposing the standard on all XML Schemas that they have the first leter of each word in every element name uppercase. My Adobe SVG Viewer will not allow the image to display unless I return the letters to lowercase. I have provided a sample below.
Does anybody have any suggestions or remedy for this dilema?


<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<SVG width="800" height="600">
<Text id="XMLID_2_" transform="matrix(1 0 0 1 114.88 159.947)">
<Tspan x="0" y="0" style="font-family:'ArialMT';font-size:13.9019">Main Object</Tspan>
</text>
<Text id="XMLID_3_" transform="matrix(1 0 0 1 67.3955 203.908)">
<Tspan x="0" y="0" style="font-family:'ArialMT';font-size:13.9019">#</Tspan>
</text>
<Text id="XMLID_4_" transform="matrix(1 0 0 1 67.3955 224.596)">
<Tspan x="0" y="0" style="font-family:'ArialMT';font-size:13.9019">#</Tspan>
</text>
<Text id="XMLID_5_" transform="matrix(1 0 0 1 102.445 234.94)">
<Tspan x="0" y="0" style="font-family:'ArialMT';font-size:13.9019">Voltage Path</Tspan>
</text>
<Text id="XMLID_6_" transform="matrix(1 0 0 1 102.445 193.565)">
<Tspan x="0" y="0" style="font-family:'ArialMT';font-size:13.9019">Voltage</Tspan>
</text>
<Text id="XMLID_7_" transform="matrix(1 0 0 1 249.842 203.908)">
<Tspan x="0" y="0" style="font-family:'ArialMT';font-size:13.9019">Voltage</Tspan>
</text>
<Text id="XMLID_8_" transform="matrix(1 0 0 1 345.522 203.908)">
<Tspan x="0" y="0" style="font-family:'ArialMT';font-size:13.9019">Source Path</Tspan>
</text>
<Text id="XMLID_9_" transform="matrix(1 0 0 1 48.1191 183.221)">
<Tspan x="0" y="0" style="font-family:'ArialMT';font-size:13.9019">Terminal Point</Tspan>
</text>
<Text id="XMLID_10_" transform="matrix(1 0 0 1 92.3833 38.4087)">
<Tspan x="0" y="0" style="font-family:'ArialMT';font-size:13.9019">Unit</Tspan>
</text>
<Path d="M55.898 56.51 L55.898 15.136 L195.538 15.136 L195.538 56.51 z"
style="fill:none;stroke:rgb(0,0,0);stroke-width:2.3668;stroke-linecap:round;stroke-linejoin:round;
"/>
<Path d="M14.523 250.454 L14.523 136.674 L236.912 136.674 L236.912 250.454 z"
style="fill:none;stroke:rgb(0,0,0);stroke-width:2.3668;stroke-linecap:round;stroke-linejoin:round;
"/>
<Path d="M55.898 61.682 L112.789 131.502"
style="fill:none;stroke:rgb(0,0,0);stroke-width:1.1834;stroke-linecap:round;stroke-linejoin:round;
stroke-dasharray:14.7767 7.3884"/>
<Path d="M68.828 61.682 L125.718 131.502"
style="fill:none;stroke:rgb(0,0,0);stroke-width:1.1834;stroke-linecap:round;stroke-linejoin:round;
stroke-dasharray:14.7767 7.3884"/>
<Path d="M182.608 61.682 L125.717 131.502"
style="fill:none;stroke:rgb(0,0,0);stroke-width:1.1834;stroke-linecap:round;stroke-linejoin:round;
stroke-dasharray:14.7767 7.3884"/>
<Path d="M195.538 61.682 L138.647 131.502"
style="fill:none;stroke:rgb(0,0,0);stroke-width:1.1834;stroke-linecap:round;stroke-linejoin:round;
stroke-dasharray:14.7767 7.3884"/>
<Path d="M81.757 229.768 L81.757 188.393 L61.07 188.393 L61.07 229.768 z"
style="fill:none;stroke:rgb(0,0,0);stroke-width:1.7751;stroke-linecap:round;stroke-linejoin:round;
"/>
<Path d="M61.07 209.08 L81.758 209.08"
style="fill:none;stroke:rgb(0,0,0);stroke-width:1.7751;stroke-linecap:round;stroke-linejoin:round;
"/>
<Path d="M81.757 198.736 L218.811 198.736 L218.811 219.424 L81.757 219.424"
style="fill:none;stroke:rgb(0,0,0);stroke-width:1.1834;stroke-linecap:round;stroke-linejoin:round;
"/>
<Path d="M218.812 209.08 L425.685 209.08"
style="fill:none;stroke:rgb(0,0,0);stroke-width:1.1834;stroke-linecap:round;stroke-linejoin:round;
"/>
</SVG>
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-09-2004, 09:29 PM
Jon - svg
Guest
 
Posts: n/a
Default Re: Case Sensitive Element names in SVG

Hi Arthur,

Quote:
Originally Posted by arthur
I have the task of creating an XML Schema for our SVG images.
I ran into a problem with the Department Of the Navy (DON) imposing the standard on all XML Schemas that they have the first leter of each word in every element name uppercase. My Adobe SVG Viewer will not allow the image to display unless I return the letters to lowercase. I have provided a sample below.
Does anybody have any suggestions or remedy for this dilema?
<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
<SVG width="800" height="600">
<Text id="XMLID_2_" transform="matrix(1 0 0 1 114.88 159.947)">
<Tspan x="0" y="0" style="font-family:'ArialMT';font-size:13.9019">Main Object</Tspan>
...
</SVG>
Wow, it is indeed a dilemma and that will be an interesting task. XML is case-sensitive. Well, I see only a couple of options depending on project constraints:

-=EXTERNAL CLIENTS APP=-
-- Consider using a schema that supports both upper- and lower-case tags - if allowed.
-- Build a converter such that your schema validates your SVG documents, then convert your documents into ASV compatible (lower-case) docs for production use.

-=IN-HOUSE APP=-
-- Consider using Batik or Mozilla instead of the ASV viewer. Batik and Mozilla are open source and so you could compile a version that allows for capitalization.
-- Build your own viewer... though I certainly would not recommend this.

I worked with schemas and DTDs a few years ago... I really enjoyed it as it provides some insights into all languages.
Have fun,

Learn SVG - http://learnsvg.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
case, element, names, sensitive, svg


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -6. The time now is 12:45 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

Epson Stylus Ink Cartridges
We stock Epson stylus ink cartridges and Epson stylus compatible ink cartridges. We offer Free UK delivery on our compatible ink cartridges

epson cartridge
Amazing Quality Ink Cartridges from Epson, don't let cheap carts ruin your printer. Our prices are low low low anyway. Internet Ink sales.

HARD DISK DRIVE DATA RECOVERY NORTH WEST
For hard disk drive data recovery in North West, let the experts help you. We have the knowledge, the experience and the right price to suit your need.

ink cartridges Free UK Delivery on ink cartridges such as Canon, Dell, Epson, hp & Lexmark.

1 2 3 4 5 6 7 8 9 10