Loading ...
Sorry, an error occurred while loading the content.

Re: [pcgen-xml] Re: Getting back on track?

Expand Messages
  • Keith Davies
    ... I haven t done much (anything, really) with DOM, but I have done some SAX. ... For the case you ve described, I don t know that I d use a MOD. There are
    Message 1 of 8 , Aug 12, 2002
      On Mon, Aug 12, 2002 at 04:55:26PM -0500, Peter Kahle wrote:
      > Cool. Makes sense. I'm going to do my homework on SAX before I ask any
      > stupid questions about it.

      I haven't done much (anything, really) with DOM, but I have done some

      > Though I will ask one stupid question about <mod> type tags. Since we've
      > talked about using references for classes and the like, and since we'd
      > be using unique identifiers for them (thus allowing both the PHB and
      > the Monte Cook Ranger to be named "Ranger" if we desire) would a moded
      > class have it's own unique identifier, and the use would say, roughly,
      > "Use the base tag as the starting point, modify by whatever's in this
      > tag, then make the base tag invisible/unselectable/whatever"? Kind
      > of like inheritance. Or, maybe require an <exclude> tag to say
      > to hide the original. So if I did a <class-mod ref='srd1.ranger'
      > refid='my.ranger'>...</class-mod> without <exclude ref='srd1.ranger'/>,
      > for example, two different Ranger classes would show up in the Classes
      > list inside the program.

      For the case you've described, I don't know that I'd use a MOD. There
      are basically two or three cases to be handled.

      1. minor change or extension of an existing element. For instance,
      adding or changing some values, but the item is otherwise the same.
      For instance, I give a +3 to those who take Skill Focus rather than
      +2, so I might do:


      <depend href="wotc/core_rules/players_handbook/feats.xml"/>
      <!-- stuff -->
      <feats xmlns:feat="http://www.pcgen.org/schema/feat.dtd">
      <mod featref="feat.skill-focus" xpath="effects/bonus/@value">+3</mod>

      (code still rough...)

      This says to grab the feat identified by 'feat.skill-focus', find the
      bonus, and change its value from +2 to +3. This causes load order to
      be quite significant, and is why I've got <depend>

      2. Adding an element that is and should stay based on another:


      <classes xmlns:class="http://www.pcgen.org/schema/class.dtd">
      <class id="class.ranger.monte" baseclassref="class.ranger">
      <name>Ranger (Monte's)</name>
      <!-- differences -->

      The above creates a new class that is based closely on the base
      class, but has some differences. Both would be visible.

      3. Element that replaces the other:


      <classes xmlns:class="http://www.pcgen.org/schema/class.dtd">
      <class id="class.ranger.monte" baseclassref="class.ranger">
      <name>Ranger (Monte's)</name>
      <!-- differences -->
      <exclude classref="class.ranger"/>

      When loading the above, it is expected that the values will be taken
      from id("class.ranger"), then changes made. Bad example, I think,
      because the classes aren't really all that similar IIRC. Anyway,
      id("class.ranger") would be added to a delete list; when the end of
      loading is reached, the IDs in the delete list will be removed.

      Or something like that. I haven't put a lot of thought into exactly how
      MODding will be done. Yet. I'm still thinking about more static

      Keith Davies

      "I'm happy to do the tracker stuff since our Microsoft Poxy Server (that's
      poxy, not proxy) won't let me connect to sourcesafe's CVS..."
      -- Karianna, pcgen mailing list
    Your message has been successfully submitted and would be delivered to recipients shortly.