<RefEntry id="parse-pi-attribute">
<!-- This file is generated automatically from the DSSSL source. -->
<!-- Do not edit this file! -->
<?html-filename parse-pi-attribute.html>

<RefMeta>
  <RefEntryTitle>parse-pi-attribute</RefEntryTitle>
  <RefMiscInfo Role="file">dblib.dsl</RefMiscInfo>
</RefMeta>

<RefNameDiv>
  <RefName>parse-pi-attribute</RefName>
  <RefPurpose>no documented purpose</RefPurpose>
</RefNameDiv>

<RefSynopsisDiv><Title>Synopsis</Title>
<Synopsis>
(parse-pi-attribute pivalues #!optional (skip #f))
</Synopsis>
</RefSynopsisDiv>
<RefSect1><Title>Source Code</Title>

<ProgramListing>
(define (parse-pi-attribute pivalues #!optional (skip #f))
  (let* ((equalpos (string-index pivalues "="))
	 (name     (substring pivalues 0 equalpos))
	 (quotchar (substring pivalues (+ equalpos 1) (+ equalpos 2)))
	 (rest     (substring pivalues 
			      (+ equalpos 2) 
			      (string-length pivalues)))
	 (quotpos  (string-index rest quotchar))
	 (value    (substring rest 0 quotpos))
	 (morevals (strip (substring rest 
				     (+ quotpos 1) 
				     (string-length rest)))))
    (if skip
	morevals
	(list name value))))
</ProgramListing>
</RefSect1>

</RefEntry>
