Jump to content


  • Posts

  • Joined

  • Last visited

eight968's Achievements


Newbie (1/7)



  1. The problem is that you have multiple groups that produce the same element types.Both G-A100 and G-A101 have an element called "CodingSchemeDesignator". So you have two groups that can each produce an element of the same name. That's where the ambiguity is.I think part of the problem is you're trying to use fixed to tell the schema what data is in the xml document when schemas are more to say what type of data and what the structure of the documenet should be.So you'd expect to see something like:<element name="person"> <complexType> <sequence> <element name="CodingSchemeDesignator"/> <element name="CodeValue" /> <element name="CodeMeaning" /> </sequence> </complexType></element>There are ways of doing what you want to do, but they aren't exactly nice. See more the abstract example in the next post.
  2. eight968

    xs:choice question

    You have a couple of options. But yes, the ambiguity is from the multiple items of the name name. What you could do is define score like this:<xs:element name="Score" type="xs:abstract"><xs:element name="Score1"> <xs:complexType> <xs:complexContent> <xs:extension base="Score">...Then you could see<Score1> ...or<Score xsi:type="Score1">However, this aside, it's generally easier to parse xml if you know exactly what type it is from the name. What are you using to parse it?
  3. It may be having trouble with intervals. You could try to use DateAdd("d", -1, DateAdd("m", 3" DateTo))
  4. IE caches get requests. You may want to try:xmlHttp.open("POST",url,true)Alternatively, you could be using the wrong progid..try each of these to see if they work for you:var progids = ["Msxml2.XMLHTTP.5.0", "Msxml2.XMLHTTP.4.0", "MSXML2.XMLHTTP.3.0", "MSXML2.XMLHTTP", "Microsoft.XMLHTTP"];
  5. This will get you closer..var str = ...if (/[0-9]+/.exec(str)) {}However, the problem with JS regular expressions is they're not greedy. The above will match a part of the string..so if your string is "b2", it will return ["2"]. What you may want is something like:if (/[0-9]+/.exec(str) != null && /[0-9]+/.exec(str)[0].length == str.length) {}
  6. This gets a little tricky. And as with many things, it depends on the browser, but this should point you in the right direction.<inside frame1>var code = "010049"<inside frame2>parent.getElementById("idOfFrame1").document.codeI think the problem you may run into is what each browser considers the parent object. And you need to think about it more of accessing something in another frame rather than sending information across frames.Hopefully this helps,Charles
  7. You could try something like the following. I don't know why it wouldn't work, but perhaps it would fail. <xsd:simpleType name="limitedString"> <xsd:restriction base="xsd:string"> <xsd:minLength value="0"/> <xsd:maxLength value="3"/> </xsd:restriction> </xsd:simpleType><xsd:simpleType name="yourString"> <xsd:restriction base="limitedString"> <xsd:pattern value="\x00[A-Za-z]*"/> </xsd:restriction></xsd:simpleType>Where \x00 is your control character's value. Basically, first you restrict the string to the length you want. Then you restrict the string to being unicode following by digits (or whatever pattern you want).You also have the alternative (ugly) approach of:(\x00[A-Za-z][A-Za-z][A-Za-z] | \x00[A-Za-z][A-Za-z] | \x00[A-Za-z] | \x00)which would match your control character and then a string of length 0, 1, 2, and 3. - Charles
  8. I have the following in XSLT:<xsl:variable name="startTime" select="@startDateTime" /><xsl:variable name="endTime" select="@stopDateTime" /><xsl:variable name="steps" select="@steps" /> I want to create "steps" number of date times that are evenly spaced out between the start and stop times. Basically I want the equivalent to the pseudocode below:<xsl:template match="@location"> <time> <xsl:value-of select="$startTime + (position() * (($endTime - $startTime) / steps))"/> </time></xsl:template>Now I haven't figured out how to do this kind of date manipulation with xslt. Is there even a way to? And if it matters, I'm using Java's jdom 1.0 library to apply this stylesheet.I just stumbled upon xquery-operators that have promise, but if someone does happen to know the answer, that'll be good too.Thanks,Charles
  9. Let's say I have a basic XML file like "<Person> <name> Charles </name> </Person>". I can easily convert this to DOM using some flavor of parse. However, I later need to serialize the DOM I created to send it over the wire. Is there a way to convert from DOM to String?"<Person> <name> Charles </name> </Person>" -> DOM // I can do thisDOM -> "<Person> <name> Charles </name> </Person>" // How do I do this?--Charles
  10. No, there is no way to link the two together that way, but you do have some other options if you change the way your xml is.You could have something like:<Data><Login UserID="" Password="" /> <LoggedInDate />Then you'd make the Login optional but the UserID and Password required.You could also do the very similar: <Data><LoginInfo> <UserId /> <Password /></LoginInfo><LoggedInDate />and make your schema like<xs:element name="LoginInfo"><xs:sequence><xs:element name="UserID" minOccurs="1"/><xs:element name="Password" minOccurs="1"/></xs:sequence></xs:element>--Charles
  11. 1) If I do a rollback to a savepoint, do I then need to make a call to releaseSavepoint too?2) If I create a statement with auto commit turned on, then set the auto commit on, do I need to create a new statement? Or will my old statement work correctly with the transactions?--Charles
  12. eight968

    PHP Login Sessions

    Just be sure the first thing you do is call session_start on your php page. That will carry over any previous session variables.--Charles
  13. Your problem is that # is a special character. Try one of these:... AND HIRE.[iSSUE#] = INVENTORY.[iSSUE#] AND MEDIA_PRODUCT.[iTEM#] = INVENTORY.[iTEM#];... AND HIRE.ISSUE## = INVENTORY.ISSUE## AND MEDIA_PRODUCT.ITEM## = INVENTORY.ITEM##;The two #'s should escape it if the brackets don't fix it.It would probably be less trouble if you renamed your tables to be item_no or something similar.
  • Create New...