Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: Release 1.0
    • Component/s: xsd scrambler
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      14

      Description

      Preserve slashes in xsd:include and xsd:redefine tags

        Activity

        Hide
        kirillcool added a comment -

        Fixed.
        The tokenizer has been changed to
        StringTokenizer tokenizer = new StringTokenizer(relativeName,
        "/
        ", false);

        And the computation of the result to
        String mappedResult = this.mapping.get(currName);
        if (mappedResult == null)

        { throw new IllegalArgumentException("No mapping found for '" + relativeName + "'"); }

        // revert back to the original include path
        tokenizer = new StringTokenizer(mappedResult, "/
        ", false);
        String lastMappedToken = "";
        while (tokenizer.hasMoreTokens())
        lastMappedToken = tokenizer.nextToken();

        String result = lastMappedToken;
        if (relativeName.length() > lastToken.length())

        { result = relativeName.substring(0, relativeName.length() - lastToken.length()) + result; }
        Show
        kirillcool added a comment - Fixed. The tokenizer has been changed to StringTokenizer tokenizer = new StringTokenizer(relativeName, "/ ", false); And the computation of the result to String mappedResult = this.mapping.get(currName); if (mappedResult == null) { throw new IllegalArgumentException("No mapping found for '" + relativeName + "'"); } // revert back to the original include path tokenizer = new StringTokenizer(mappedResult, "/ ", false); String lastMappedToken = ""; while (tokenizer.hasMoreTokens()) lastMappedToken = tokenizer.nextToken(); String result = lastMappedToken; if (relativeName.length() > lastToken.length()) { result = relativeName.substring(0, relativeName.length() - lastToken.length()) + result; }

          People

          • Assignee:
            kirillcool
            Reporter:
            kirillcool
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: