vCard output from XProc?

What I did:

Wrote XSL to convert xCard (RFC 6351) →  vCard 3 (RFC 2426)
(Yes, I realize that xCard is based on vCard 4 (RFC 6350), and that I’m producing vCard 3 output. My current project requires this.)
Tested XSL successfully
Wrote XProc to do the following:
pre-process xCard document
use the previous XSL to convert it to vCard
Oxygen v14 
Mac OS X 10.8 (“Mountain Lion”)


Keep getting errors about non-XML output
Pipeline is (currently) a <p:declare-step />
Output is:

<p:output   port     ='result'
            primary  ='false'
            sequence ='true'

XProc file: /Users/amrogers/Desktop/2012 Summer Camp /generate-vcards.xpl
Engine name: Calabash XProc
Severity: error
Description: err:XD0001 : XD0001 It is a dynamic error if a non-XML resource is produced on a step output or arrives on a step input.

This is my first attempt at using XProc in a long time.  So, sorry if this is a n00b question.  

 One reason I haven’t used XProc for so long is because of frustrations like this.  Apart from my gripes about the syntax, there’s the error messages.  

 How am I supposed to troubleshoot the above error?  

 Exactly what was the “non-XML resource” that was produced?  Can’t the error even give me a snippet of it?

 On which step’s “output or […] input” did the “non-XML resource” occur?

 Plus, I thought it was okay for a step not to produce any output if it specified @sequence ='true',  implying zero or more documents on the output.  

And now, the source code (forgive the indentation strangeness—pasting the source caused the glitch):

<?xml version='1.0' encoding='UTF-8'?>
 name  ='generate-vcards'
 version  ='1.0'
 xpath-version   ='2.0'
        xmlns:p  =''
 xmlns:c  =''
 xmlns:err =''
 xmlns:xs =''

 xmlns:cx =''
     xmlns:xsl =''
     xmlns:h         =''
     xmlns:xcard     ='urn:ietf:params:xml:ns:vcard-4.0' 
     xmlns:vcard     ='' 
     xmlns:nc        ='urn:new-culture:summer-camp:east:2012'
 xmlns:local ='#empty'>

 ======================================================================== -->
 <p:input port     ='source' />
     <p:output    port     ='result' 
       primary  ='false'
              sequence ='true' 
 ======================================================================== -->
  name  ='opt1'
  required ='false'
  select  =" '' " 
  name  ='opt2'
  required ='false'
  select  =" '' " 

  May bind to any output (not just "result").
 ======================================================================== -->
  port    ='result' 
   method              ='text'
   encoding   ='UTF-8'
 ======================================================================== -->
        <!--<p:variable name    ='dude...' 
                        select  ='"...I know!"'
 ======================================================================== -->
        Calabash extension steps
    Network connection irrelevant; 
    imported from Calabash-bundled library
 <p:import href=''    />
 ======================================================================== -->
 <p:group name='xcard-cleanup'>
     <p:delete match='xcard:n/xcard:*[ not(@nc:share) ]/text()' />
            <p:delete match='xcard:adr/xcard:*[ not(@nc:share) ]/text()' />
            Remove private data  
            (ignores xcard:categories for now, so I can customize it)
     <p:delete match='xcard:vcard//*[
      not(ancestor-or-self::xcard:n              ) and               
      not(descendant-or-self::xcard:n            ) and
      not(ancestor-or-self::xcard:adr            ) and
      not(descendant-or-self::xcard:adr          ) and
      not(ancestor-or-self::xcard:categories     ) and
      not(ancestor-or-self::node()[ @nc:share ] or
          descendant-or-self::node()[ @nc:share ])
    <p:xslt name='xsl-to-vcard'>
        <p:input port='stylesheet'>
            <p:document href='${HOME}/Library/Application Support/oXygen/templates/vcard.xsl' />
        <p:input port='parameters'>
            <p:empty />
    <p:sink />
    <p:store   name='stored-doc' 
     <p:input port='source'>
         <p:pipe port='result' step='xsl-to-vcard' />

Help me xproc-dev list…you’re my only hope! ☺ 


Received on Monday, 20 August 2012 15:36:37 UTC