Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

unable to include a named pattern within another named pattern #6

Open
GoogleCodeExporter opened this issue Aug 6, 2015 · 4 comments

Comments

@GoogleCodeExporter
Copy link

I'm trying to writeup this simple pattern in KEL:
http://www.wingedsheep.com/blog/2009/01/14/double_dropped_scarf.html

This is the pattern as I wrote it in English:

    *  Cast on 25 stitches
    * Row 1-20: knit
    * Row 21: K1,* yo, yo, k1 * repeat to end of row
    * Row 22: K1,* Drop yo's, k1 * repeat to end of row
    * Row 23 - 28: knit
    * Repeat these 8 rows (rows 21 - 28) until scarf reaches desired length
Row N - N+20: knit (knit last 20 rows)
    * Bind off

This is the pattern as I *tried* to write it in KEL:

  Directions {             
      UseNeedle 'needle-size8Circular'
      CastOn 25 sts
      Instruction 'garter-st' {
        Row: k to end
      }
      Repeat 'garter-st' for 19 additionalTimes
      Instruction 'double-drop-pattern' {
        Row: K1, repeat to end { yo, yo, k1 }
        Row: K1, repeat to end { drop, drop, k1 } // see issue #5, this
line fails because its not in the library
        Repeat 'garter-st' for 6 additionalTimes // I can't repeat an
instruction within an instruction
      }
      Repeat 'double-drop-pattern' for 20 additionalTimes
      NextRow: BindOff all sts 
  }

This renders correctly in the XML view (i.e., I see that it states to
repeat the garter pattern within the double-drop pattern)

But when I go to the pattern view I get the following error:

Could not render pattern: exception is
com.knitml.renderer.common.RenderingException:
org.jibx.runtime.JiBXException: Expected
"{http://www.knitml.com/schema/pattern}instruction" end tag, found
"{http://www.knitml.com/schema/pattern}repeat-instruction" start tag (line
55, col 7) 
at
com.knitml.renderer.service.impl.RenderingServiceImpl.renderPattern(RenderingSer
viceImpl.java:22)

at
com.knitml.gpec.kel.editors.PatternViewControlContainer.doRenderPattern(PatternV
iewControlContainer.java:136)


version 0.2.0 on MacOSX

Original issue reported on code.google.com by jessica.sant on 19 Mar 2010 at 12:59

@GoogleCodeExporter
Copy link
Author

I hadn't gotten around to allowing instructions within instructions due to some
technical complexities. I can take a look to see what it will take an provide an
estimate.

Original comment by [email protected] on 29 Mar 2010 at 4:32

  • Added labels: Type-Enhancement
  • Removed labels: Type-Defect

@GoogleCodeExporter
Copy link
Author

To solve your instruction-within-instruction problem, try this:

Directions {             
      UseNeedle 'needle-size8Circular'
      CastOn 25 sts
      Instruction 'garter-st' {
        Row: k to end
      }
      Repeat 'garter-st' for 19 additionalTimes
      Instruction 'double-drop-pattern' {
        Row 1: K1, repeat to end { yo, yo, k1 }
        Row 2: K1, repeat to end { drop, drop, k1 } // see issue #5, this line fails
because its not in the library
        Row 3-8: k to end
      }
      Repeat 'double-drop-pattern' for 20 additionalTimes
      NextRow: BindOff all sts 
  }

Original comment by [email protected] on 29 Mar 2010 at 4:37

@GoogleCodeExporter
Copy link
Author

My apologies... the syntax is actually:

Row [3,4,5,6,7,8]: k to end



Original comment by [email protected] on 29 Mar 2010 at 8:00

@GoogleCodeExporter
Copy link
Author

Original comment by [email protected] on 4 Nov 2011 at 4:24

  • Added labels: Priority-Low
  • Removed labels: Priority-Medium

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant