Jump to content

Khisanth Magus

Members
  • Posts

    5
  • Joined

  • Last visited

Khisanth Magus's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. I"m sure that the answer to this is going to be either a simple "its not possible", or something that will make me want to bang my head on the desk for not realizing myself.I am working in exporting Java classes to XML. It is working well enough, but I ran into something. Is there a way to import one xml file into another xml file? Essentially I have 2 different types of java classes I want to export. One class has a list of the other class inside of it. So, instead of defining all of the information again in the castor mapping, I want to import the xml from the one file to be used in its parent file.I hope this made some sense...basically I just want to import one XML file so what is in that file is usable in another XML file.
  2. I have a variable created that is supposed to hold whether something exists within the source document.<xsl:variable name="BSExists" select="boolean(aamc:SECTION/aamc:SECTIONNAME[contains(.,'BS')])" />I am using XMLSpy, and when using the debugger the variable tracker says that BSExists is true. However, when I try and test it in a <choose>-<when> function I cannot get the program to go into the when. I have tried the following:<when test="BSExists"><when test="BSExists = true"><when test="BSExists = 'true'"><when test="BSExists = true()>I'm running out of things I can try. None of these allowed the translation to step into the when case, it always skipped to the <otherwise> case.
  3. I've been able to get that much working. Here is the situation that I am having problems with:First, I am taking an xml document and putting it into a CSV format. The sections come in the same order in every document. There is the possibility within each document that 1, 2, or all 3 of the sections is missing. If a section is missing, i have to still have the commas in place where they would normally be.Here is an example:The first thing I get from all three sections is a number(that is forced into a 2 digit format). If all three sections are there, it looks like: *stuff before sections*,27,06,13,*stuff after*.Now, if the first section(PS) is missing, it would have to look like *stuff*,,06,13*stuff*.If section 2 is missing, it would look like *stuff*,27,,13,*stuff*If 1 and 3 were missing: *stuff*,,06,,*stuff*
  4. I have an xml file that has 3 sections appropriately named SECTION. Each contains the name of the section. The problem is that the name can change between source files, only the last 2 characters of the section name being the same in all of the source files. Those last 2 characters of the section names are PS, VR, and BS. I need to be able to specify which one I'm working on. The reason I need to do this is that there is the possibility that a section will be missing, and I need to be able to detect which one is missing, if any.
×
×
  • Create New...