Commit graph

563 commits

Author SHA1 Message Date
Jez Higgins
3beed1d092 Verify that qNames used in the stylesheet (for template names and what not) have prefixes which are actually bound 2010-10-06 22:37:01 +01:00
Jez Higgins
981fd4e9e3 Failed if namespace was explicitly given as empty. Fixed 2010-10-05 09:39:58 +01:00
Jez Higgins
ccc4836fd7 Allow and ignore attributes in foreign namespaces 2010-10-05 09:39:05 +01:00
Jez Higgins
eda354be6d Correctly implement the xsl:sort option attributes as attr-value-templates. Validate values *after* evaulated AVT, not before. Doh 2010-10-04 22:18:39 +01:00
jez
d322e15038 Explicitly compare pointer to zero to silence a rather pointless VS warning 2010-10-04 12:14:04 +01:00
jez
c1b21c0790 Explicitly compare pointer to zero to silence a rather pointless VS warning 2010-10-04 12:08:33 +01:00
Jez Higgins
d28849dc48 Finally sorted out the attributes and their namespaces issues. hurrah 2010-10-03 16:08:54 +01:00
Jez Higgins
8f41a01b88 Fix for non-std::string classes 2010-08-20 21:32:22 +01:00
Jez Higgins
3eb404dcd9 Updated for Xerces changes 2010-08-20 21:31:55 +01:00
Jez Higgins
abaaaf4cc4 Generate a namespace prefix for unprefixed attributes in namespaces. It's a start, but needs to check for clashes. I also wonder if there are cases when I need to generate them for elements too. Hmmm 2010-07-14 22:36:05 +01:00
jez
7e8752fe30 Getting DOM operator<< to work with other strings 2010-07-14 09:08:46 +01:00
jez
94b834ff30 Sorted out exception handling in MSXML ContentHandler wrapper so that it no longer corrupts the stack 2010-05-21 09:56:18 +01:00
jez
a1ed87da31 fix segfault using MSXML 2010-05-19 20:22:22 +01:00
jez
a856f2ed7b fix so vs10 compiles without complaining 2010-05-19 20:19:31 +01:00
jez
4a79db620c whitespace changes 2010-05-19 20:18:49 +01:00
Jez Higgins
04754750c5 fixed initialisation order warnings 2010-02-21 22:29:06 +00:00
Jez Higgins
94a28f07f8 filled out element-available implementation 2010-02-21 22:14:04 +00:00
Jez Higgins
44b5d6ed3a whipped up a quick do-nothing (ie broken) implementation of element-available 2010-02-21 18:35:58 +00:00
Jez Higgins
7977423180 fixed warning 2010-02-20 23:39:38 +00:00
Jez Higgins
bd9052e486 think I finally done function-available 2010-02-20 23:25:36 +00:00
Jez Higgins
3557ec2d37 simplified parseQName so you can pass in a std::map if you fancy 2010-02-20 23:24:31 +00:00
Jez Higgins
cbc3f6e8d6 still chipping away at function-available 2010-02-20 21:56:47 +00:00
Jez Higgins
fb380c8e08 fixed warnings 2010-02-20 13:47:07 +00:00
Jez Higgins
c35185a64c add hasFunction to FunctionResolver interface 2010-02-20 13:03:22 +00:00
Jez Higgins
9d7384c8ef fixed unused parameter warnings 2010-02-20 09:27:32 +00:00
Jez Higgins
67c5ae7846 pulled out a seperate function resolver for Standard XPath functions 2010-02-20 09:13:53 +00:00
Jez Higgins
4e29877ac1 initial implementation of function-available, currently returned only false 2010-02-19 23:21:30 +00:00
jez
427129f83d refactored string sorting 2010-02-16 10:18:29 +00:00
jez
95c8185828 refactored numeric sort 2010-02-16 08:59:45 +00:00
Jez Higgins
fe2ac49555 install includes into arabica subdirector 2010-01-14 16:09:40 +00:00
Jez Higgins
39d706d038 updated build to explicitly list all the includes, so that they get installed and uninstalled. make distcheck should now work 2010-01-14 14:29:55 +00:00
Jez Higgins
613f99af9d xsl:sort/@lang - still don't do anything with it, but now only output a warning rather than throwing an exception 2010-01-13 22:13:12 +00:00
Jez Higgins
b46b48d006 I think that's the last of the warnings 2010-01-11 09:28:48 +00:00
Jez Higgins
3dc2f255c7 silenced many more warnings 2010-01-11 09:02:17 +00:00
Jez Higgins
953e46ba92 another warning squashed 2010-01-10 22:59:33 +00:00
Jez Higgins
36a305d55b fixed more warnings 2010-01-10 22:02:43 +00:00
Jez Higgins
2e82578767 more warnings silenced 2010-01-10 21:25:35 +00:00
Jez Higgins
327328c9aa more warnings silenced 2010-01-10 20:49:20 +00:00
Jez Higgins
c8bf5a5296 more warnings sorted out 2010-01-10 20:23:53 +00:00
Jez Higgins
7f8d20b46f more warnings fixed 2010-01-10 18:47:09 +00:00
Jez Higgins
65f1c0be23 fixed unused param warnings 2010-01-09 23:45:36 +00:00
Jez Higgins
7fbed3b382 fixed ambiguous else 2010-01-09 23:01:41 +00:00
Jez Higgins
7103c3973a fixed unused param warning 2010-01-09 23:00:39 +00:00
Jez Higgins
549e67f314 silenced unused parameter warnings 2010-01-09 22:58:37 +00:00
Jez Higgins
c0b76904c7 removed redundant check against 0 2010-01-09 22:34:29 +00:00
Jez Higgins
6c55f7f36c silenced unused param warnings 2010-01-09 22:34:13 +00:00
jez
5ec2316aa5 fixed segfault when created doctype before owner doc has been set 2010-01-06 21:52:49 +00:00
Jez Higgins
74f8a55ed4 chmod -x *.hpp 2010-01-02 22:53:28 +00:00
Jez Higgins
181d5eab5c normalize whitespace when extracting CDATA element names 2010-01-02 22:21:38 +00:00
Jez Higgins
29d425528d popped quotes around the wrong thing 2010-01-02 22:20:13 +00:00
Jez Higgins
9d25d0bed0 updated copyright dates 2010-01-01 23:03:33 +00:00
Jez Higgins
7e62969c6c Fixed double delete problem when removing and readding an attribute 2010-01-01 23:03:01 +00:00
Jez Higgins
d7c3b7c260 reverted work on variables - will come back to it another time 2009-12-14 23:55:56 +00:00
Jez Higgins
5fa42997f4 make each variable its own little stack frame. i am, howver, going to back all this stuff out because I'm getting it wrong in some subtle but segfaulty way 2009-12-14 22:40:05 +00:00
Jez Higgins
9eeb67aa3e convert node type from enum to int to silence gcc warning about exceeding the maximum value of the enum 2009-12-14 22:39:15 +00:00
jez
17e93705ae redirect to DOMSink when evaluating variables. This wasn't being done for ResolvedVariables and so everything was exploding. 2009-12-14 14:20:12 +00:00
jez
80da48a661 Ash Berlin's patch for Element.setAttributeNodeNS 2009-12-06 21:39:46 +00:00
jez
719829f10a Ash Berlin's patch to get Text.splitText working properly 2009-12-06 21:34:46 +00:00
jez
57a1f36532 Applied patch from Ash Berlin which silences a pile of compiler warnings about unused parameters. 2009-12-06 20:48:35 +00:00
Ash Berlin
31c13685d1 Remove warnings:
* Unused variable
  * Unsigned value always >= 0
  * Parameter initialization order
  * Virtual destructors for virtual classes
2009-11-28 01:12:28 +00:00
jez
283c48de75 fix to bug identified by Ash Berlin in set/get/removeNamedItemNS 2009-11-25 10:23:27 +00:00
jez
2cb2cc8bbe NamedNodeMap tests and bugfix 2009-11-23 22:36:15 +00:00
jez
3991f80eb2 increment changes with the aim of improviing performance of variables 2009-11-23 21:00:23 +00:00
Alex Ott
2eba62942a add virtual destructors for classes, to avoid warnings when inheriting from these classes 2009-10-06 15:13:17 +02:00
Alex Ott
42f85936fa explicit casting, to avoid warnings 2009-10-06 15:12:43 +02:00
Alex Ott
975cca8c20 Use proper boost includes for different boost versions
starting from boost 1.38, there is boost.spirit v2 in the repository, older version
could be used as 'classic'
2009-10-06 12:38:30 +02:00
jez
6785fd8944 litte bit more work on variable resolution, but train in v wobbly and it giving me a headache 2009-10-05 19:27:24 +01:00
jez
29f73f285b When declaring a parameter, only create a new variable closure if a parameter
hasn't been passed.
2009-08-18 21:16:12 +01:00
jez
db940c9b78 Pass select by const ref not by value 2009-08-18 20:42:37 +01:00
U-isla\jez
2adf2618ed Pulled static const int definitions out into cpp file 2009-08-01 08:48:41 +01:00
jez
9d72ecf556 More work on optimising expression evaluation. 2009-07-31 17:44:54 +01:00
jez
1f12f0a2f0 nodeset functions now use NodeSetXPathFunction base class 2009-07-13 09:24:26 +01:00
jez
b56f09d2d9 added NodeSetXPathFunction base class 2009-07-13 09:24:03 +01:00
jez
428121bab4 moved string functions to use StringXPathFunction base class 2009-07-13 09:13:50 +01:00
jez
bbcae98bec renamed XPath function base classes, moved out of impl namespace 2009-07-13 09:13:11 +01:00
jez
41b0da452f added StringFunction base class 2009-07-13 08:47:46 +01:00
jez
c65cb5c8aa added NumericExpression and NumericFunction base classes 2009-07-13 08:24:52 +01:00
jez
7e3caeb2d0 converted AxisEnumerator to uses Node_impl* internally 2009-05-19 09:24:19 +01:00
jez
4611919eff whitespace changes 2009-05-18 19:33:04 +01:00
jez
a46276eb57 Reworked to reduce number of temporary objects created 2009-05-12 09:18:56 +01:00
jez
9167533dc8 compiled recent changes with GCC so made the necessary standard compliance fixes :) 2009-05-11 19:33:48 +01:00
jez
50e46f3bcc refactored to eliminate temporary object creation 2009-05-11 10:24:51 +01:00
jez
50fbb691cd efactgoring to avoid creating so many temporary objects when evaluation expressions and values 2009-05-11 08:55:52 +01:00
jez
014ea05879 updated TO-DO to include various performance improvement ideas 2009-05-05 19:30:47 +01:00
jez
d681db69b2 Literal result element as stylesheet - done 2009-04-28 20:59:52 +01:00
jez
9f6fbba927 removed left over stuff for foreign element handling 2009-04-28 09:00:05 +01:00
jez
7b1c5c9541 started on literal result elements as stylesheet 2009-04-28 08:57:14 +01:00
jez
bf5799eefd pulled foreign element handling - fixed parameter order inconsistency 2009-04-24 19:02:14 +01:00
jez
6081659b71 neatening 2009-04-24 15:54:13 +01:00
jez
62b24c144d Resolved cdata-section-element names so that unprefixed names are in the default namespace. Merge multiple xsl:output/@cdata-section-elements 2009-04-07 13:39:31 +01:00
jez
b70e521d79 hooked up cdata-section-elements to the output 2009-04-07 10:29:56 +01:00
jez
f6dfa127a1 OK, forget what I said about state machines, let just hack in some flags.
Initial work on CDATA section output.  If I manually populate the set of 
cdata section elements, everything looks great, so I just need to hook that up.
Added operator< to QName so I pop it in a std::set.
2009-04-03 19:01:26 +01:00
jez
89f6585d65 pulled output into its own file 2009-03-31 20:06:06 +01:00
jez
f373a1d01b some work on implementing cdata section output, then realised it would probably be easier if I dropped a state machine in there 2009-03-31 20:00:26 +01:00
jez
7dd3cb4ab4 blow up if we see an extension prefix declaration 2009-03-31 09:15:32 +01:00
jez
94d5a26c6c skip test for two arg version of document() - not yet implemented 2009-03-27 08:30:28 +00:00
jez
4f28c8ae71 key as match pattern now runs - woo 2009-03-23 19:38:59 +00:00
jez
0a6f2071eb Id and Key match patterns now compile 2009-03-23 19:08:04 +00:00
jez
83cd0cd15b working on the IdKey match pattern - currently crashes 2009-03-17 21:08:26 +00:00
jez
9f4c8d213a xsl:stylesheet can have an id attribute 2009-03-17 19:07:00 +00:00
jez
67e8a31360 allow whitespace within xsl:output 2009-03-17 09:07:22 +00:00
jez
334317f422 filename case fixes 2009-03-12 20:00:35 +00:00
jez
8cadf886d0 Got Taggle test passing.
Rework Taggle's internal Element class to use a reference counting scheme, 
so it's passed around by reference, rather than y value (and hence having lots of copying).  I think the ref-counting is correct, but I haven't checked it yet.
2009-03-12 09:49:45 +00:00
jez
55e7094204 whitespace changes 2009-03-09 22:52:34 +00:00
jez
8f97c52f8a added copy constructor to KeyFunction::UriMapper - some compilers want to copy, while the cooler ones can optimise that copy away :) 2009-03-04 20:34:30 +00:00
jez
b01c03f591 exclude attributes in the XSL namespace from literal elements 2009-03-03 18:15:34 +00:00
jez
b6c83a0028 corrected key population when use is a union 2009-03-03 08:12:26 +00:00
jez
9ddbb95491 implemented nodeset version of key() 2009-03-03 07:58:29 +00:00
jez
88150c062e use NodeSet.to_document_order instead of sort 2009-03-03 07:58:14 +00:00
jez
d7602d5a7d Windows compatibility fix - it defines min as a macro, so use bracket function call to defeat it 2009-02-26 14:38:23 +00:00
jez
e33535905a propagating qualified name changes 2009-02-26 14:04:41 +00:00
jez
4af8e6472e keys stored on a per-document basis, as per the end of rec 12.2 2009-02-26 10:30:16 +00:00
jez
8cb5109ac1 keys now look something up. yay! 2009-02-26 10:16:49 +00:00
jez
ff835d03c0 Pass inscope namespaces to key functions so it can resolve key names at runtime
key() now works (bar nodeset argument)
just need to do the key lookup
2009-02-26 09:32:55 +00:00
jez
b494ffe317 added push_back(NodeSet) 2009-02-26 09:32:02 +00:00
jez
9b70ca5187 rather large commit, propagating the QualifiedName changes through the NamespaceSupport and Tracker, simplifying item names in XSLT and so on. 2009-02-24 12:21:35 +00:00
jez
c0659319c4 switch NamespaceSupport over to use QualifiedName 2009-02-23 22:02:17 +00:00
jez
4030057c74 propogating recent edits through 2009-02-23 19:43:20 +00:00
jez
a958b03544 parameterised XML string tests on string_adaptor
hooked into qname parsing
2009-02-23 19:23:12 +00:00
jez
412a7f2204 initial version of parseQName 2009-02-23 09:14:35 +00:00
jez
31b8d99a83 parameterised QualifiedName 2009-02-23 08:38:50 +00:00
jez
32bc0e6597 decided to go with prefixes after all 2009-02-23 07:57:24 +00:00
jez
46d51800aa Fix to uri parsing so that something like
http://www.google.com
finishes up with www.google.com as the host, and not the path.
Yay.
2009-02-20 23:00:01 +00:00
jez
2fd1f52ace starting xsl:key/key()
started qnmae refactoring
2009-02-18 22:48:35 +00:00
jez
297345f3c3 started filling out xsl:key and keys. need to do a bit of refactoring around QNames now, to make everything a little easier 2009-02-18 09:36:41 +00:00
jez
b22708f126 s/XPathValuePtr/XPathValue/ 2009-02-18 08:37:16 +00:00
jez
0b2bb658b9 Skinned up skeleton implementation of key() function. Doesn't do anything yet though :) 2009-02-18 08:37:00 +00:00
jez
4d9c2a485a started work on xsl:key/key() 2009-02-16 22:10:00 +00:00
jez
c7a3f9be3f improved validation on template priority value 2009-01-03 21:41:26 +00:00
jez
2877e7e9b7 escape tab, CR, & LF in attribute values 2009-01-02 23:08:22 +00:00
jez
e944732d82 detects loops in imports as well as includes 2008-12-29 22:29:27 +00:00
jez
8c65657d84 added currentBase - handy for debugging 2008-12-29 22:29:04 +00:00
jez
73a90f502d catch include loops 2008-12-29 21:14:44 +00:00
jez
ab4f951840 fixed top level variable precedence 2008-12-02 11:26:58 +00:00
jez
0a2220dbb0 added operator<< back in for debugging 2008-12-02 11:26:28 +00:00
jez
cd97e2aa58 Correct top level variable declarations 2008-11-25 12:49:25 +00:00
jez
38d2783be3 Finally! Determining import precedence for templates is properly correct. 2008-11-25 12:27:33 +00:00
jez
fe40d482f5 Aha! The push/pop precedence thing is, of course, wrongly wrong. Need to assign the new precedence at the point we encounter the xsl:import, then set that precedence as current when we actually load it. I'll sort that out next time, because it's bedtime for programmers now. 2008-11-24 23:11:22 +00:00
jez
538a8969ad seed the Precedence next generation differently, so can pop as well as just push precedence stack as we unwind imports 2008-11-24 22:26:58 +00:00
jez
6f39b28daa Reworked current_generation stuff to use the templates' Precedence instead of a plain old int 2008-11-24 22:05:16 +00:00
jez
f610d739fe More work on rejigging precedence.
Templates are now constructed with their precedence.
Variables are too, with a tweak to allow for the immediate evaluation of non-topl-level params and vars.
The execution context now no longer needs to track variable precedence, which is good because it will be getting it wrong anyway.
Corresponding simplifications follow to compliation context.
2008-11-19 17:26:07 +00:00
jez
8d0ce36da3 Rework variable handling to use the Precedence class. Currently it has the same (incorrect) behaviour as before, but it's all part of moving to towards (what I hope will be) proper import precedence handling. 2008-11-05 22:55:53 +00:00
jez
e8c0aaa416 Started work on refactoring precedence handling. Need to try and preserver the tree shape it forms, rather than a simple case of monotonically increasing precen
I mean decreasing precedence.
2008-11-05 02:57:18 +00:00
jez
2b2c09b1f3 Took out unparsed-entity-uri(). Not having it is better than have a neutered version. 2008-11-05 02:55:44 +00:00
jez
6c8a3e8404 hmm, I'll be needing this to make the previous checkin actually work 2008-11-05 02:54:49 +00:00
jez
b74514bc58 Shuffled around the Stylesheet class. Stylesheet is now the public face, while CompiledStylesheet is what gets chucked around internally. 2008-11-05 01:33:28 +00:00
jez
f74170e268 In XPath numbers do not have leading +, so, while '-1.5' converts to -1.5,
'+1.5' converts to NaN.  Weird and counter-intuitive perhaps, but it's there
in the spec.

Sort now sets context node appropriately, so current() works in sorting 
expressions.
2008-11-03 22:19:59 +00:00
jez
db54b7c7bc In XPath numbers do not have leading +, so, while '-1.5' converts to -1.5, '+1.5' converts to NaN. Weird and counter-intuitive, but in the spec. 2008-11-03 18:29:10 +00:00
jez
57f793ccc8 provided null implementation for unparsed-entity-uri 2008-10-27 22:20:49 +00:00
jez
4e418a8622 Implemented generate-id function 2008-10-27 19:13:47 +00:00
jez
04de9f2b60 Throw exception on xsl:sort lang not on order. Oops. 2008-10-27 14:26:20 +00:00
jez
c4d237e97b Bugfix: flush buffer on startEntity/endEntity 2008-10-21 22:54:37 +01:00
jez
7f99fa0b1e output warning message now directed to the message_sink 2008-10-21 22:53:00 +01:00
jez
ea9d34c7d0 Validates xml:space values. Attributes in the xml namespace now returned too 2008-09-19 09:03:19 +01:00
jez
d3f42542ad Updated template handler to use the attribute validator 2008-09-19 09:03:19 +01:00
jez
2f4848bedc Fixed element value when has consecutive text node descendants 2008-09-19 09:03:19 +01:00
jez
36400c00be Quick patch to stop Taggle mangling up UTF-8 multibyte sequences. 2008-09-19 09:03:19 +01:00
jez
93549c451d improved preceding and preceding-sibling in the face of consecutive text nodes 2008-09-18 22:43:56 +01:00
jez
2cf6d009bf added some more following, following-sibling, and child axis tests in the presence of text nodes 2008-09-17 22:58:36 +01:00
jez
49fa53e9b0 Updated child and descendant axis to skip over adjacent text nodes 2008-09-16 08:58:18 +01:00
jez
57e8e9248e Reworked node value to combine consecutive text nodes together into a single value 2008-09-13 18:36:46 +01:00
jez
25dc9795ab slipped TextCoalescer filter into the DOM builder, so that consecutive bits of text get applied to a single Text or CDATA node, rather than as a series of nodes. (A series of nodes is perfectly legal, it's just slightly unexpected. Even to me, and I work with DOMs a lot :) 2008-09-03 00:44:50 +01:00
jez
d173537cde sync with home 2008-09-03 00:39:39 +01:00
jez
bc233d68ca Updated NodeTest to match CDATA sections as well as text nodes. 2008-08-26 11:53:14 +01:00
jez
cec3c0c659 reworked absolutising, it's better, but I need to go back to the RFC at some point 2008-08-25 23:05:37 +00:00
jez
07ef52f308 Added -table option to test executables. It outputs the results as a tab
seperated table, which can be pasted into spreadsheet/google docs/etc.
2008-08-09 23:19:21 +01:00
jez
1ad8594aad updated attribute validation to allow attributes in the xml namespace 2008-08-09 21:03:15 +01:00
jez
cd3577292d Ensure an unbound namespace prefix throws an exception 2008-08-09 18:24:34 +01:00
jez
b668bdc3b2 removed TODO comment, because I actually did it sometime ago 2008-08-09 18:24:11 +01:00
jez
a1890d2a31 amazingly, the XPath prefix:* didn't compile. I had no test for it, and had overlooked it. fixed 2008-08-09 17:32:28 +01:00
jez
04af379b54 ensure @xmlns|@xsmlns:* selects no nodes 2008-08-09 17:03:44 +01:00
jez
3511768691 was evaluating select expression twice - there was no need 2008-08-09 17:03:02 +01:00
jez
0aeeb9c1fb Don't suppress element namespace prefixes or attributes which are in the
XSL namespace.
2008-08-08 22:46:18 +01:00
jez
468d401865 converted tabs to spaces 2008-08-08 22:45:53 +01:00
jez
b08e5f8ab5 Visual Studio 6 hasn't been a build target for some time now. Removed the left over bits of VS6 specific workarounds. 2008-08-06 23:05:53 +01:00
jez
812925e669 Added configure tests for std::mbstate_t and/or mbstate_t. Some platforms
don't have it (VxWorks, for example).
2008-08-06 22:31:39 +01:00
jez
363a413a53 When running stylesheet, resolve variable values straightaway. This flushes out unresolved references and so on, although only in templates which are actually run.
Added several more test cases.
2008-08-06 12:34:35 +01:00
jez
fc2a67619b Corrected spelling of precedence. I have no idea why I had it wrong in the first place, it just seems to be what comes out of my fingers 2008-08-06 12:07:59 +01:00
jez
b187cc1667 Removed use of boost:ptr_vector. Turns out that std::vector<boost::ptr_vector<something> > won't compile.
Also see http://sourceforge.net/mailarchive/message.php?msg_name=2103b1960807291110y5f0063eaqb4c855f5aa56974e%40mail.gmail.com and discussion for bonus reason.
2008-08-06 11:48:06 +01:00
jez
843631092c Resolve top level variables, to make sure they are properly defined.
Variables within templates are not resolved in this way unless they are actually used.
2008-08-05 22:17:08 +01:00
jez
b559feb7be Added several more variables tests, related the namespace prefixes
fixed internal qname resolution - 2.4 says unprefixed names are not in the default namespace
fixed xsl:element - unprefixed names, when no namespace uri is supplied are in teh default namespace
2008-08-05 22:03:33 +01:00
jez
72e8decc76 added some precedence tests 2008-08-05 20:35:28 +01:00
jez
2667963142 Top level variables are now handled according to import precedence. 2008-08-05 18:29:18 +01:00
jez
538fe00271 whitespace changes 2008-08-05 15:32:40 +01:00
jez
441be1bbf2 attribute and elements now form there own variable scope. 2008-08-03 17:11:27 +01:00
jez
1ac9440433 reject variables/params which have both a select attribute and text content 2008-08-02 21:58:20 +00:00
jez
d357f70405 detect circular references and throw exception 2008-08-02 21:41:44 +00:00
jez
189ea0a33e corrected xsl:stylesheet attribute validation 2008-08-01 19:42:37 +01:00
jez
53c647c1a1 Changed default text handling. Text containing only whitespace is now output, where previously it was suppressed.
All Modes tests now pass.
2008-08-01 19:33:52 +01:00
jez
6a2101d6cb Verify qNames when processing. 2008-08-01 19:20:28 +01:00
jez
3a3f5d4b32 Validate xsl:stylesheet attributes properly 2008-08-01 19:19:49 +01:00
jez
f14cb010a3 added is_qname function, and tests 2008-08-01 13:02:41 +01:00
jez
e0fcea7d71 added is_ncname_char 2008-08-01 13:02:21 +01:00
jez
353ad2fa91 corrected copyright date 2008-07-29 19:50:33 +01:00
jez
f29fbced15 libxml2 and xerces wrappers now build again 2008-07-17 10:00:32 +01:00
jez
88de9056da build through on cygwin with expat 2008-07-16 10:01:08 +01:00
jez
ce8fb28f5f added get_string_adaptor as a slightly less typing version of using get_param to pull it 2008-07-16 09:08:59 +01:00
jez
707cd47f41 After all this time realised I had too many template parameters on the
XMLReaderInterface template.  It is only interested in string_type and 
string_adaptor.  All the fancy TMP to extract types and what not 
is only relevant in *_wrapper classes.
2008-07-15 18:59:03 +01:00
jez
01cfd6eef7 build files for VS2008 2008-07-15 09:10:43 +01:00
jez
3d62ee558e Applied Michael Fink's Win32 expat patch 2008-07-07 17:00:11 +01:00
jez
04e0cb5952 craigp's patch for Xerces 2.8 2008-07-04 23:06:37 +01:00
jez
1719005582 updated for gcc 4.3.1 2008-07-03 21:43:56 +00:00
jez
1b1b5d2072 fixed typedef 2008-06-26 13:37:17 +00:00
jez
508536ee27 Patches so that we can build successfully without Boost. 2008-06-26 13:34:00 +00:00
jez
1431e900e9 throw error if transform is run with no input 2008-06-04 20:30:36 +00:00
jez
73d0cdaef9 fixed for other than std::strings 2008-05-30 21:45:27 +00:00
jez
3874438091 Include default namespace when constructing namespace nodes 2008-05-28 16:37:15 +00:00
jez
9ba32a5160 corrected compareNodes for the case where the two nodes are from different documents 2008-05-28 15:08:58 +00:00
jez
2e1b775e71 changed the handling of RelativeLocationPath token when building a step list. There might be things following the path, and must take them into account. Test position89 exposed a problem prompting this change. 2008-05-28 15:08:35 +00:00
jez
53fbf26ff0 Correctly implemented Namespace Nodes.
The XPath data model requires that namespace nodes are associated with an element, and sort ahead of attribute nodes in document order.  Until now, Arabica's namespace node had no parent, or owner document and so was failing these requirements.  The Xalan position111 test case highlights this requirement.
2008-05-28 08:53:21 +00:00
jez
5d7f3364ba Visual Studio, how I curse your useless warning C4800 2008-05-28 08:45:25 +00:00
jez
f89a2be3cc fix in MultiplicativeExpr rule for Boost 1.35 2008-05-04 18:10:03 +00:00
jez
261f589f47 2008-05-04 14:41:23 +00:00
jez
51e4cad4a0 marked functions as inline as requested, although not entirely sure if it should be necessary :) 2008-04-28 09:13:49 +00:00
jez
84d7d9390a spelled underlying_impl wrong all these years and never realised, start work on sorting namespace nodes ahead of attribute nodes 2008-04-23 14:41:00 +00:00
jez
c6564e798c added missing typename 2008-04-23 14:39:11 +00:00
jez
f818f192af fixed match rewriting when there are leading predicates - http://www.jezuk.co.uk/jez/2008April#3711 2008-04-18 09:11:51 +00:00
jez
a049a72c08 fixed sorting bug when reverse sorting a nodeset which includes the root node 2008-04-17 20:32:32 +00:00
jez
9ea360f3ef collapsed tagsoup-port into mainline 2008-04-07 15:37:47 +00:00
jez
ebbd739051 initialise lexicalHandler_ 2008-02-08 16:01:38 +00:00
jez
71b7af819f xsl:sort - blow up if we get a lang attribute 2008-01-19 22:45:48 +00:00
jez
7bd88a7bbe 2007-12-25 22:23:25 +00:00
jez
0850f50269 tweaking document order across documents - not for any better reason than making a test case pass 2007-12-25 21:56:28 +00:00
jez
934a03e703 oops - ncnames don't contain colons 2007-12-23 22:52:39 +00:00
jez
95a3a42002 can see it now - uninitialised variable 2007-12-23 09:51:28 +00:00
jez
2e6c372933 hacked up a ncname test, although it's not working at the moment and I'm tired and can't think 2007-12-22 22:21:26 +00:00
jez
be877b8d50 MSVC can't handle static members in nest classes of template classes 2007-12-21 17:02:12 +00:00
jez
235f81718d Added Expression_scanner and scan (a visitor pattern basically) to allow XPathExpression_impls to be examined. This is used in the match rewriting to search for position() and last() function calls.
To ease implementing scan, BinaryExpression and UnaryExpression now inherit XPathExpression_impl.  Other classes now derived only from Binary|UnaryExpression rather than from XPathExpression_impl as well.
2007-12-21 15:56:04 +00:00
jez
a8ce93f89b First proper go at rewriting positional matches. 2007-12-21 14:13:36 +00:00
jez
cbc9cf3797 it's late 2007-12-20 23:24:16 +00:00
jez
f87c01fc53 2007-12-20 16:23:56 +00:00
jez
cdac22542e added type() to XPath expressions. I need this to allow XSLT match patterns to be rewritten properly - see http://www.jezuk.co.uk/cgi-bin/view/arabica/log?id=3546 - but it will also be useful for compile time checking (should I get sufficiently keen :) 2007-12-18 23:03:16 +00:00
jez
02fe02da03 "If the parser has not read a declaration for the attribute, or if the
parser does not report attribute types, then it must return the value
"CDATA" as stated in the XML 1.0 Recommentation (clause 3.3.3,
"Attribute-Value Normalization")."

and:
"Returns: The attribute's type as a string, or an empty string if the
index is out of range."

Problem found reported by Christoph Anderegg, christoph@anderegg-sommer.ch
and corrected with this commit.
2007-12-07 23:28:59 +00:00
jez
e659f3cce4 changed scope of StackFrame for apply templates 2007-11-26 23:17:11 +00:00
jez
213934528b xsl:stylesheet now allows top-level elements in a foreign namespace 2007-11-23 00:07:08 +00:00
jez
7c491700d3 disallow pcdata ahead of xsl:param 2007-11-22 23:02:08 +00:00
jez
6425632f01 blow up if QName is bad 2007-11-22 22:36:47 +00:00
jez
4ed4928695 check xsl:for-each selects a node-set, I suspect it should be able to diagnose this at compile time but it at least it fails :) 2007-11-22 21:54:51 +00:00
jez
c7c0c3d36c xsl:processing-instruction shouldn't allow xml as the name 2007-11-22 21:24:17 +00:00
jez
cdebc3d128 moved namespace and function resolver into compilation context. disallowed current() in match patterns 2007-11-22 19:24:18 +00:00
jez
375a2d584f no longer expose xpath compiler directly during XSLT compilation 2007-11-22 17:50:25 +00:00
jez
69a322f7f2 Alex Ott's patch to kill an initialisation order warning 2007-11-22 16:50:33 +00:00
jez
e2713a0fbc DOM stream now outputs <elem/> for empty elements 2007-11-22 16:49:25 +00:00
jez
95857fc467 detect duplicate variable and parameter names 2007-11-21 22:35:04 +00:00
jez
341d3db1ac reworked stylesheet compiler and inclusion to trap illegal elements as xsl:stylesheet's children 2007-11-21 22:34:15 +00:00
jez
a9a5858300 working on detecting illegal xsl:stylesheet children - including is currently broken 2007-11-20 23:12:08 +00:00
jez
a0083c14d2 '' 2007-11-19 22:11:05 +00:00
jez
0d385d1ab2 xsl:call-template throws if it can't find a matching template 2007-11-16 23:11:39 +00:00
jez
a9d7e1dcdd verify xsl:sort attribute values 2007-11-16 23:10:41 +00:00
jez
7962545efb Blow up if unknown child element encounter 2007-11-16 22:27:21 +00:00