7 |
# $Id$ |
# $Id$ |
8 |
# |
# |
9 |
# $Log$ |
# $Log$ |
10 |
|
# Revision 1.7 2003/05/13 09:32:22 joko |
11 |
|
# minor update to pod |
12 |
|
# |
13 |
|
# Revision 1.6 2003/05/07 03:11:28 joko |
14 |
|
# updated pod: new section "References", added item to "Todo" section |
15 |
|
# |
16 |
# Revision 1.5 2003/05/06 14:24:06 joko |
# Revision 1.5 2003/05/06 14:24:06 joko |
17 |
# doesn't use Carp any more |
# doesn't use Carp any more |
18 |
# updated pod |
# updated pod |
48 |
xupdate - Process XUpdate commands against an XML document. |
xupdate - Process XUpdate commands against an XML document. |
49 |
|
|
50 |
|
|
51 |
=head3 Their implementations differ: |
=head4 Their implementations differ: |
52 |
|
|
53 |
1. xupdate (by Petr Pajas) uses ... |
1. xupdate (by Petr Pajas) uses ... |
54 |
XML::XUpdate::LibXML - Simple implementation of XUpdate format |
XML::XUpdate::LibXML - Simple implementation of XUpdate format |
63 |
2. This xupdate attempts to implement the XUpdate specs using XSLT only. |
2. This xupdate attempts to implement the XUpdate specs using XSLT only. |
64 |
|
|
65 |
|
|
66 |
=head3 Yet another xupdate - facts in short: |
=head4 Yet another xupdate - facts in short: |
67 |
|
|
68 |
S: It would be nice to have a pure perl thingy which does (almost) the same stuff.... |
S: It would be nice to have a pure perl thingy which does (almost) the same stuff.... |
69 |
|
|
79 |
S?: Proposal: XML::XUpdate::XSLT::API uses XML::XUpdate::XSLT::CRUD |
S?: Proposal: XML::XUpdate::XSLT::API uses XML::XUpdate::XSLT::CRUD |
80 |
|
|
81 |
|
|
82 |
=head4 Todo |
=head3 References |
83 |
|
|
84 |
|
- XUpdate: |
85 |
|
Requirements: http://www.xmldb.org/xupdate/xupdate-req.html |
86 |
|
Working Draft: http://www.xmldb.org/xupdate/xupdate-wd.html |
87 |
|
- XML API: |
88 |
|
- XML::XUpdate::LibXML: http://search.cpan.org/author/PAJAS/XML-XUpdate-LibXML-0.4.0/lib/XML/XUpdate/LibXML.pm |
89 |
|
- XSL / XSLT: |
90 |
|
http://www.w3.org/TR/xslt |
91 |
|
http://www.xsl-rp.de/ |
92 |
|
http://xml.klute-thiemann.de/w3c-de/REC-xslt-20020318/ |
93 |
|
http://xmlxslt.sourceforge.net/ |
94 |
|
- misc pointers: |
95 |
|
"Re: Modify XML documents": http://aspn.activestate.com/ASPN/Mail/Message/perl-xml/1265431 |
96 |
|
XSL Extensions: http://xmlsoft.org/XSLT/extensions.html |
97 |
|
EXSLT: http://www.exslt.org/set/functions/difference/index.html |
98 |
|
"how to insert element at required position in document tree?": http://p2p.wrox.com/archive/xslt/2001-06/98.asp |
99 |
|
XML APIs for Databases: http://www.javaworld.com/javaworld/jw-01-2000/jw-01-dbxml.html |
100 |
|
|
101 |
|
|
102 |
|
=head3 Todo |
103 |
|
|
104 |
o What about proper encoding? (ISO-8859-1 or UTF-8) |
o What about proper encoding? (ISO-8859-1 or UTF-8) |
105 |
o Is it possible to create the required "xsl_template.xml" at runtime via XSL itself? |
o Is it possible to create the required "xsl_template.xml" at runtime via XSL itself? |
106 |
o Cache contents of external files (*.xml). Performance! |
o Cache contents of external files (*.xml). Performance! |
107 |
o Can exception / error-code handling be improved somehow? |
o Can exception / error-code handling be improved somehow? |
108 |
Esp.: It would be interesting, if the XUpdate payload actually could be applied, or not... |
Esp.: It would be interesting, if the XUpdate payload actually could be applied, or not... |
109 |
|
o Conditional processing: <xupdate:if>, etc. |
110 |
|
|
111 |
|
|
112 |
=cut |
=cut |
180 |
sub open_xupdate { |
sub open_xupdate { |
181 |
my $self = shift; |
my $self = shift; |
182 |
my $xml = shift; |
my $xml = shift; |
183 |
# FIXME: check for filename, filehandle and U<RL (etc.) |
# FIXME: check for filename, filehandle and URL (etc.) |
184 |
$self->{XML}->{xupdate} = $xml; |
$self->{XML}->{xupdate} = $xml; |
185 |
} |
} |
186 |
|
|
210 |
my $self = shift; |
my $self = shift; |
211 |
|
|
212 |
# debug - print the calculated xsl on STDERR |
# debug - print the calculated xsl on STDERR |
213 |
#print STDERR $self->get_stylesheet("_worker"), "\n"; |
print STDERR $self->get_stylesheet("_worker"), "\n"; |
214 |
|
|
215 |
#return; |
#return; |
216 |
$self->{XSLT_ENGINE_LIVE} = XML::XSLT->new( |
$self->{XSLT_ENGINE_LIVE} = XML::XSLT->new( |