Lines Matching refs:node
132 CMNode node = useRepeatingLeafNodes(particle) ? buildCompactSyntaxTree(particle) : buildSyntaxTree(particle, true);
133 if (node == null)
136 return new XSDFACM(node, fLeafCount);
144 // 4. make sure each leaf node (XSCMLeaf) has a distinct position
202 // to create a zero-or-one (optional) node for the non-empty
217 // 4. make sure each leaf node (XSCMLeaf) has a distinct position
218 private CMNode expandContentModel(CMNode node,
224 nodeRet = node;
228 nodeRet = fNodeFactory.getCMUniOpNode(XSParticleDecl.PARTICLE_ZERO_OR_ONE, node);
232 nodeRet = fNodeFactory.getCMUniOpNode(XSParticleDecl.PARTICLE_ZERO_OR_MORE, node);
236 nodeRet = fNodeFactory.getCMUniOpNode(XSParticleDecl.PARTICLE_ONE_OR_MORE, node);
238 else if (optimize && node.type() == XSParticleDecl.PARTICLE_ELEMENT ||
239 node.type() == XSParticleDecl.PARTICLE_WILDCARD) {
248 : XSParticleDecl.PARTICLE_ONE_OR_MORE, node);
253 // create a+ node first, then put minOccurs-1 a's in front of it
254 // for the first time "node" is used, we don't need to make a copy
255 // and for other references to node, we make copies
256 nodeRet = fNodeFactory.getCMUniOpNode(XSParticleDecl.PARTICLE_ONE_OR_MORE, node);
258 // an entire new copy of the node (a subtree). this is to ensure
262 multiNodes(node, minOccurs-1, true), nodeRet);
269 nodeRet = multiNodes(node, minOccurs, false);
272 node = fNodeFactory.getCMUniOpNode(XSParticleDecl.PARTICLE_ZERO_OR_ONE, node);
274 nodeRet = multiNodes(node, maxOccurs-minOccurs, false);
278 nodeRet, multiNodes(node, maxOccurs-minOccurs, true));
286 private CMNode multiNodes(CMNode node, int num, boolean copyFirst) {
291 return copyFirst ? copyNode(node) : node;
295 multiNodes(node, num1, copyFirst),
296 multiNodes(node, num-num1, true));
299 // 4. make sure each leaf node (XSCMLeaf) has a distinct position
300 private CMNode copyNode(CMNode node) {
301 int type = node.type();
305 XSCMBinOp bin = (XSCMBinOp)node;
306 node = fNodeFactory.getCMBinOpNode(type, copyNode(bin.getLeft()),
309 // for ?+*, copy the subtree, and put it in a new ?+* node
313 XSCMUniOp uni = (XSCMUniOp)node;
314 node = fNodeFactory.getCMUniOpNode(type, copyNode(uni.getChild()));
316 // for element/wildcard (leaf), make a new leaf node,
320 XSCMLeaf leaf = (XSCMLeaf)node;
321 node = fNodeFactory.getCMLeafNode(leaf.type(), leaf.getLeaf(), leaf.getParticleId(), fLeafCount++);
324 return node;
375 // we need to create a zero-or-one (optional) node for the non-empty particles.
407 // {n,m}: Instead of expanding this out, create a compound leaf node which carries the