Hi michael,

Thank you for your guide about the well-formed external parsed entities,
after read the specification detail carefully, now, i think i can resolve
whether the XML fragment in LSInput is well-formed or not.

2010/3/29 Michael Glavassevich <[email protected]>

>  Hi Yin,
>
> Yin Lei <[email protected]> wrote on 03/25/2010 04:53:16 AM:
>
> > Hi Michael,
>
> >
> > About the function parseWithContext(LSInput input,  Node
> > contextArg,short action), there is a point i am not so clear.
> >
> > If LSInput contains following content:
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <element id="1">element_one</element>
> > <element id="2">element_two</element>
> >
> > For a LSInput, is it well-format or legal ? Or we could just neglect
> > XML declation ?
>
> It matches the production [1] for well-formed external parsed entities so I
> would say yes it's allowed. That's a text declaration [2] by the way, not an
> XML declaration.
>
>
> > If this input is legal,action is ACTION_INSERT_AFTER and contextArg
> > is a DOM element has the following content:
> >
> > <contextnode>content here</contextnode>
> >
> > Should we return this DOM Node ?
> >
> > <contextnode>content here</contextnode>
> > <element id="1">element_one</element>
> > <element id="2">element_two</element>
>
> As long as the parent of "contextnode" is an Element or a DocumentFragment
> that is the correct result.
>
>
> > Thank you and expceting your reply
>
> Thanks.
>
> [1] http://www.w3.org/TR/2006/REC-xml-20060816/#NT-extParsedEnt
> [2] http://www.w3.org/TR/2006/REC-xml-20060816/#NT-TextDecl
>
>
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: [email protected]
> E-mail: [email protected]
>
>

Reply via email to