Welcome to the Invelos forums. Please read the forum rules before posting.

Read access to our public forums is open to everyone. To post messages, a free registration is required.

If you have an Invelos account, sign in to post.

    Invelos Forums->DVD Profiler: Desktop Technical Support Page: 1  Previous   Next
Question on XML
Author Message
Invelos Software, Inc. RepresentativeKen Cole
Invelos Software
Registered: March 10, 2007
United States Posts: 4,282
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
I've upgraded to the latest version of the XML engine we use in order to allow the price information to use standardized decimal separation.  That part works, but one of the other enhancements in the engine is that it no longer writes out empty attributes.  So, for instance:

      <Actor FirstName="Leonardo" MiddleName="" LastName="DiCaprio" BirthYear="0" Role="Billy" CreditedAs="" Voice="False" Uncredited="False"/>

becomes:

      <Actor FirstName="Leonardo" LastName="DiCaprio" BirthYear="0" Role="Billy" Voice="False" Uncredited="False"/>

I can override this behavior if needed, but the newer style is more efficient.  My question is whether this will cause any issues for those who use the XML export?
Invelos Software, Inc. Representative
DVD Profiler Unlimited RegistrantStar ContributorTomGaines
Registered Sept. 24, 2001
Registered: March 13, 2007
Reputation: High Rating
Germany Posts: 2,005
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
For the version of my Viewer tool it would cause issues. But I can modify it, if needed.
But that was one of the things I liked about the new XML schema. One could depend, that a certain entry was available and no extra checks were needed.
But if you think the other way is better, it is your choice.


Invelos Software, Inc. RepresentativeKen Cole
Invelos Software
Registered: March 10, 2007
United States Posts: 4,282
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
OK, no problem we can keep the empty attributes.  One other thing is changing - the purchase price tag is moving inside PurchaseInfo where it belongs.
Invelos Software, Inc. Representative
DVD Profiler Unlimited Registrantrincewind
phpmyprofiler dev
Registered: March 13, 2007
Germany Posts: 51
Posted:
PM this userVisit this user's homepageDirect link to this postReply with quote
I write a new xml-parser for phpmyprofiler. For me it would be easier if the empty attributes are written into the export. But if you choice to skip these attributes I would find a solution.
Never argue with an idiot. He brings you down to his level, then beats you with experience.


Wir gegen die Gier - Joseph Weizenbaum (1923 - 2008):
Nichts wird unsere Kinder und Kindeskinder vor einer irdischen Hölle retten.
Es sei denn: Wir organisieren den Widerstand gegen die Gier des globalen Kapitalismus.
DVD Profiler Unlimited RegistrantStar ContributorMithi
Sushi Annihilator
Registered: March 13, 2007
Reputation: Superior Rating
Germany Posts: 2,217
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
well, for my simple needs I use
      <xsl:if test="string-length(@MiddleName)&gt;0">
to determine if the MiddleName has a value or not, so empty or not there is the same for me.

So my vote is a clear: "Whatever" 

cya, Mithi
Mithi's little XSLT tinkering - the power of XML --- DVD-Profiler Mini-Wiki
DVD Profiler Unlimited Registrantdvdoug
As seen on Slashdot...
Registered: March 13, 2007
Posts: 55
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
I'm fine either way
Doug

DougWeb.org - my personal site.
TWSNBN.com
Unofficial DVD Profiler Resource Centre - serving hundreds of users every month!
DVD Profiler Wiki
DVD Profiler Unlimited RegistrantFredLooks
phpDVDProfilerDude D5/7/2
Registered: March 13, 2007
Canada Posts: 350
Posted:
PM this userEmail this userVisit this user's homepageView this user's DVD collectionDirect link to this postReply with quote
I prefer the empty attributes, but it's not a big deal ...
-fred
DVD Profiler Unlimited Registrantgoodguy
Sita Sings the Blues
Registered: March 14, 2007
Reputation: Superior Rating
Germany Posts: 1,029
Posted:
PM this userDirect link to this postReply with quote
I'm of course in favour of the more efficient approach, which means a value of "False" could be omitted, too.

And what happens to empty tags like <DistTrait/>?

Oh, and a question that has bugged me for a long time: Why do you have a custom boolean data type of "False" and "True" instead of the xs:boolean values "false" and "true"?
Matthias
    Invelos Forums->DVD Profiler: Desktop Technical Support Page: 1  Previous   Next