Menu
News
All News
Dungeons & Dragons
Level Up: Advanced 5th Edition
Pathfinder
Starfinder
Warhammer
2d20 System
Year Zero Engine
Industry News
Reviews
Dragon Reflections
Columns
Weekly Digests
Weekly News Digest
Freebies, Sales & Bundles
RPG Print News
RPG Crowdfunding News
Game Content
ENterplanetary DimENsions
Mythological Figures
Opinion
Worlds of Design
Peregrine's Next
RPG Evolution
Other Columns
From the Freelancing Frontline
Monster ENcyclopedia
WotC/TSR Alumni Look Back
4 Hours w/RSD (Ryan Dancey)
The Road to 3E (Jonathan Tweet)
Greenwood's Realms (Ed Greenwood)
Drawmij's TSR (Jim Ward)
Community
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Resources
Wiki
Pages
Latest activity
Media
New media
New comments
Search media
Downloads
Latest reviews
Search resources
EN Publishing
Store
EN5ider
Adventures in ZEITGEIST
Awfully Cheerful Engine
What's OLD is NEW
Judge Dredd & The Worlds Of 2000AD
War of the Burning Sky
Level Up: Advanced 5E
Events & Releases
Upcoming Events
Private Events
Featured Events
Socials!
Twitch
YouTube
Facebook (EN Publishing)
Facebook (EN World)
Twitter
Instagram
TikTok
Podcast
Features
Top 5 RPGs Compiled Charts 2004-Present
Adventure Game Industry Market Research Summary (RPGs) V1.0
Ryan Dancey: Acquiring TSR
Q&A With Gary Gygax
D&D Rules FAQs
TSR, WotC, & Paizo: A Comparative History
D&D Pronunciation Guide
Million Dollar TTRPG Kickstarters
Tabletop RPG Podcast Hall of Fame
Eric Noah's Unofficial D&D 3rd Edition News
D&D in the Mainstream
D&D & RPG History
About Morrus
Log in
Register
What's new
Search
Search
Search titles only
By:
Forums & Topics
Forum List
Latest Posts
Forum list
*Dungeons & Dragons
Level Up: Advanced 5th Edition
D&D Older Editions
*TTRPGs General
*Pathfinder & Starfinder
EN Publishing
*Geek Talk & Media
Search forums
Chat/Discord
Menu
Log in
Register
Install the app
Install
The
VOIDRUNNER'S CODEX
is coming! Explore new worlds, fight oppressive empires, fend off fearsome aliens, and wield deadly psionics with this comprehensive boxed set expansion for 5E and A5E!
Community
General Tabletop Discussion
*Pathfinder & Starfinder
Any other DDI Character Builder Sheet Templates?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Eric Finley" data-source="post: 4775294" data-attributes="member: 83401"><p>The new XML, unfortunately, is <em>bad</em> XML. (IMO.) Bizarrely, some sections that you <em>don't</em> need use decent XML... but the bits you need are coded such that using, for instance, Adobe Live-Cycle Designer to build a PDF form for it are at a minimum bloody tricky, and quite possibly undoable without Javascript.</p><p></p><p>For example, there's a section with the base ability scores (before even racial modifiers). That section would be quite usable, if we cared, but we don't. For example, the <AbilityScores> tag here contains a tag called <Strength>, done up with an attribute (in the XML sense) into <Strength value="16" /> or the like. This, we could extract with PDF data bindings. Not too bad. It would have been even better if the tag had actually been a normally closed tag with the value as its contents, like this: <Strength>16</Strength>... but the one they've used is okay.</p><p></p><p>However... when it comes time to get the values we actually WANT, they've used a completely back-asswards XML setup which renders the data practically inextricable. Here's the data for the actual Strength score:[code] <Stat name="Strength" value="16"></p><p> <alias name="Strength" /></p><p> <alias name="str" /></p><p> <statadd value="14" /></p><p> <statadd Level="1" value="2" charelem="a171cd0" /></p><p> </Stat>[/code]This doesn't look so bad, and indeed is pretty easily parsed by eye... but to the data binding it's practically opaque.</p><p></p><p>Even <Stat strength="16" /> would have been a better way to do it.</p><p></p><p>To retrieve the data from my preferred form it'd look something like this:</p><p>$return.CharacterSheet.AbilityScores.Strength.value</p><p></p><p>To retrieve from the this-isn't-so-bad version they've used for the pointless pre-modifier values, you'd use something like:</p><p>$return.CharacterSheet.AbilityScores.Strength.getAttribute("value")</p><p></p><p>Neither of those is too bad, because the name of the tag is indicative to us.</p><p></p><p>But for the actual one they used? Don't be confused by the <em>name</em> attribute. The actual <em>name</em> of a <Stat ... /> tag is <u>Stat</u>. But there are many "Stat" tags. How do we tell them apart? By the "name" attribute.</p><p></p><p>How shall I put this... this is terrible code. Because you can't, as far as I can tell in a couple hours of looking at the PDF XML spec, actually sort by attribute <em>value</em>. I can pull out, say, "the first 'Stat' tag which has an attribute named 'Strength'." But here they're obliging us to ask the code the following question:</p><p></p><p>"Go through all your tags named 'Stat' with the attribute 'name.' Pull up the value of this 'name' attribute, and compare them to a constant I will tell you - in this case it's 'Strength'. Once you find the one which matches this, then pass the tag (not the attribute, nor its value) to a call which will actually extract the value of the attribute 'value'." Yech!</p><p></p><p>Imagine you're running a party. You have a guest list; your staff can quickly find each guest by name. Each guest holds a placard which could hold a number. And you get to the question, "Okay. What's Bob's number?" In good XML, this is easy as pie.</p><p></p><p>Here? WotC has supplied us with the following fancy dress party:</p><p>- Every guest is named Sam. Each and every one of them.</p><p>- Every guest's placard is inexplicably blank.</p><p>- Every guest has a card in their right-hand pocket, in Arabic. On the card is their secret name for the event. You have one staff member, Alain, who picks pockets and reads Arabic.</p><p>- Every guest also has a corsage which encodes to their number in the Victorian 'language of flowers'. You have a second staff member, Judith, who can understand this code.</p><p></p><p>So in order to get Bob's number, you must:</p><p>- Tell Alain to go up to every Sam in the room, and pick their pocket.</p><p>- Once he finds the one whose card says "Bob", point that person out to Judith.</p><p>- Judith looks at that person and infers the number, and tells it to you.</p><p></p><p>Compare and contrast to the 'guest list and placard' model that XML is supposed to be.</p><p></p><p>Worse, in the case of PDF forms, as far as I can tell, you don't even have Alain on staff. You have to go hire an external company, Javascript Inc., to send Alain to your party. And you can only communicate with Alain using the company's official forms - no talking to him directly.</p><p></p><p>Epic. XML. Fail.</p><p></p><p>(Note - I am relatively new to XML. I understand the theory better than the practice. It may easily be the case that Alain was hiding under the table and I missed him. It may be the case that the guest list, indexed by secret name, is hiding in the refrigerator. And it is possible, even likely, that for some situations (WotC knows that an unknown number of persons named "Pow Ercard" will be coming to the party, but not what their secret names will be), the approach used may be necessary. But for the most part, in a situation like this where all we want to do is ask Strength Smith his number, and we know he'll arrive and there's only one of him? Freakin' horrible.)</p></blockquote><p></p>
[QUOTE="Eric Finley, post: 4775294, member: 83401"] The new XML, unfortunately, is [I]bad[/I] XML. (IMO.) Bizarrely, some sections that you [I]don't[/I] need use decent XML... but the bits you need are coded such that using, for instance, Adobe Live-Cycle Designer to build a PDF form for it are at a minimum bloody tricky, and quite possibly undoable without Javascript. For example, there's a section with the base ability scores (before even racial modifiers). That section would be quite usable, if we cared, but we don't. For example, the <AbilityScores> tag here contains a tag called <Strength>, done up with an attribute (in the XML sense) into <Strength value="16" /> or the like. This, we could extract with PDF data bindings. Not too bad. It would have been even better if the tag had actually been a normally closed tag with the value as its contents, like this: <Strength>16</Strength>... but the one they've used is okay. However... when it comes time to get the values we actually WANT, they've used a completely back-asswards XML setup which renders the data practically inextricable. Here's the data for the actual Strength score:[code] <Stat name="Strength" value="16"> <alias name="Strength" /> <alias name="str" /> <statadd value="14" /> <statadd Level="1" value="2" charelem="a171cd0" /> </Stat>[/code]This doesn't look so bad, and indeed is pretty easily parsed by eye... but to the data binding it's practically opaque. Even <Stat strength="16" /> would have been a better way to do it. To retrieve the data from my preferred form it'd look something like this: $return.CharacterSheet.AbilityScores.Strength.value To retrieve from the this-isn't-so-bad version they've used for the pointless pre-modifier values, you'd use something like: $return.CharacterSheet.AbilityScores.Strength.getAttribute("value") Neither of those is too bad, because the name of the tag is indicative to us. But for the actual one they used? Don't be confused by the [I]name[/I] attribute. The actual [I]name[/I] of a <Stat ... /> tag is [U]Stat[/U]. But there are many "Stat" tags. How do we tell them apart? By the "name" attribute. How shall I put this... this is terrible code. Because you can't, as far as I can tell in a couple hours of looking at the PDF XML spec, actually sort by attribute [I]value[/I]. I can pull out, say, "the first 'Stat' tag which has an attribute named 'Strength'." But here they're obliging us to ask the code the following question: "Go through all your tags named 'Stat' with the attribute 'name.' Pull up the value of this 'name' attribute, and compare them to a constant I will tell you - in this case it's 'Strength'. Once you find the one which matches this, then pass the tag (not the attribute, nor its value) to a call which will actually extract the value of the attribute 'value'." Yech! Imagine you're running a party. You have a guest list; your staff can quickly find each guest by name. Each guest holds a placard which could hold a number. And you get to the question, "Okay. What's Bob's number?" In good XML, this is easy as pie. Here? WotC has supplied us with the following fancy dress party: - Every guest is named Sam. Each and every one of them. - Every guest's placard is inexplicably blank. - Every guest has a card in their right-hand pocket, in Arabic. On the card is their secret name for the event. You have one staff member, Alain, who picks pockets and reads Arabic. - Every guest also has a corsage which encodes to their number in the Victorian 'language of flowers'. You have a second staff member, Judith, who can understand this code. So in order to get Bob's number, you must: - Tell Alain to go up to every Sam in the room, and pick their pocket. - Once he finds the one whose card says "Bob", point that person out to Judith. - Judith looks at that person and infers the number, and tells it to you. Compare and contrast to the 'guest list and placard' model that XML is supposed to be. Worse, in the case of PDF forms, as far as I can tell, you don't even have Alain on staff. You have to go hire an external company, Javascript Inc., to send Alain to your party. And you can only communicate with Alain using the company's official forms - no talking to him directly. Epic. XML. Fail. (Note - I am relatively new to XML. I understand the theory better than the practice. It may easily be the case that Alain was hiding under the table and I missed him. It may be the case that the guest list, indexed by secret name, is hiding in the refrigerator. And it is possible, even likely, that for some situations (WotC knows that an unknown number of persons named "Pow Ercard" will be coming to the party, but not what their secret names will be), the approach used may be necessary. But for the most part, in a situation like this where all we want to do is ask Strength Smith his number, and we know he'll arrive and there's only one of him? Freakin' horrible.) [/QUOTE]
Insert quotes…
Verification
Post reply
Community
General Tabletop Discussion
*Pathfinder & Starfinder
Any other DDI Character Builder Sheet Templates?
Top