Using xmlstarlet and OpenOffice

Bruce Dawson jbd at codemeta.com
Wed Mar 3 16:06:10 EST 2010


Thanks to all who helped (especially Brian St. Pierre). I finally got
the script to work, and put it on the web site (see
http://wiki.gnhlug.org/twiki2/bin/view/Www/OfficeSuites).

This is useful for extracting form data from an OO document (I mean
document forms, not OObase forms).

--Bruce

Bruce Dawson wrote:
> Ahh. I see now why its an ugly hack. I shudder when thinking how you
> discovered that syntax.
>
> --Bruce
>
> Bruce Dawson wrote:
>   
>> Is there a syntax error in there? I looks like the quotes don't match
>> up. And I get the same error as before when I try to fix those up.
>>
>> --Bruce
>>
>> Brian St. Pierre wrote:
>>   
>>     
>>> This is an ugly hack, but it works...
>>>
>>> xmlstarlet select --net -T \
>>>      -N office='urn:oasis:names:tc:opendocument:xmlns:office:1.0"
>>> xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0' \
>>>      -t -v 'office:document-content/office:body/office:text/text:p/text:span/text:text-input'
>>> content.xml
>>>
>>> Luckily it passes the namespace declaration through to the XSLT
>>> unchanged. You only need to declare the namespaces used in the XPath
>>> query.
>>>
>>> -Brian
>>> _______________________________________________
>>> gnhlug-discuss mailing list
>>> gnhlug-discuss at mail.gnhlug.org
>>> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>>>   
>>>     
>>>       
>> _______________________________________________
>> gnhlug-discuss mailing list
>> gnhlug-discuss at mail.gnhlug.org
>> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>>   
>>     
>
> _______________________________________________
> gnhlug-discuss mailing list
> gnhlug-discuss at mail.gnhlug.org
> http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/
>   



More information about the gnhlug-discuss mailing list